Fix: (org-ql-select) Don't search hidden/special buffers

This commit is contained in:
Adam Porter 2019-08-13 15:05:47 -05:00
parent b634647e46
commit 3856e61800
2 changed files with 4 additions and 1 deletions

View file

@ -386,6 +386,7 @@ Expands into a call to ~org-ql-select~ with the same arguments. For convenience
+ Handle date ranges in date-based selectors. (Thanks to [[https://github.com/codygman][Cody Goodman]], [[https://github.com/swflint][Samuel W. Flint]], and [[https://github.com/vikasrawal][Vikas Rawal]].) + Handle date ranges in date-based selectors. (Thanks to [[https://github.com/codygman][Cody Goodman]], [[https://github.com/swflint][Samuel W. Flint]], and [[https://github.com/vikasrawal][Vikas Rawal]].)
+ Don't overwrite bindings in =org-agenda-mode-map=. + Don't overwrite bindings in =org-agenda-mode-map=.
+ Don't search buffers without headings, and show a message if the user attempts it. + Don't search buffers without headings, and show a message if the user attempts it.
+ Don't search hidden/special buffers.
*Compatibility* *Compatibility*
+ Fixes for compatibility with Org 9.2. (Thanks to [[https://github.com/ataias][Ataias Pereira Reis]] and [[https://github.com/dakra][Daniel Kraus]].) + Fixes for compatibility with Org 9.2. (Thanks to [[https://github.com/ataias][Ataias Pereira Reis]] and [[https://github.com/dakra][Daniel Kraus]].)

View file

@ -156,7 +156,9 @@ non-nil."
;; It feels unintuitive that `find-file-noselect' returns ;; It feels unintuitive that `find-file-noselect' returns
;; a buffer if the filename doesn't exist. ;; a buffer if the filename doesn't exist.
(find-file-noselect it)) (find-file-noselect it))
(user-error "Can't open file: %s" it))))))) (user-error "Can't open file: %s" it)))))
;; Ignore special/hidden buffers.
(--remove (string-prefix-p " " (buffer-name it)))))
(query (org-ql--pre-process-query query)) (query (org-ql--pre-process-query query))
((query preamble-re) (org-ql--query-preamble query)) ((query preamble-re) (org-ql--query-preamble query))
(predicate (org-ql--query-predicate query)) (predicate (org-ql--query-predicate query))