This commit is contained in:
rayslava 2025-07-03 05:15:23 +00:00 committed by GitHub
commit b2b3064d07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

@ -99,6 +99,11 @@ directories, etc, which would make it slow to list the
`org-directory' files recursively."
:type 'boolean)
(defcustom org-ql-search-buffer-major-modes '(org-mode)
"Search not only in buffers with `org-mode' set as major mode.
E.g. `org-journal-mode' can be enabled as well."
:type '(repeat symbol))
;;;; Commands
;;;###autoload

View file

@ -1147,7 +1147,8 @@ current buffer. Otherwise BUFFERS-FILES is returned unchanged."
"Return BUFFERS-FILES expanded to a list of files or buffers.
The counterpart to `org-ql-view--contract-buffers-files'."
(pcase-exhaustive buffers-files
("all" (--select (equal (buffer-local-value 'major-mode it) 'org-mode)
("all" (--select (member (buffer-local-value 'major-mode it)
org-ql-search-buffer-major-modes)
(buffer-list)))
("org-agenda-files" (org-agenda-files))
("org-directory" (org-ql-search-directories-files))