Fix: (org-ql--query) Error if run in non-Org-derived buffer
This commit is contained in:
parent
a3aac8466b
commit
db6543b18c
1 changed files with 2 additions and 0 deletions
|
|
@ -117,6 +117,8 @@ a list of defined `org-ql' sorting methods: `date', `deadline',
|
||||||
(user-error "Can't open file: %s" it)))))
|
(user-error "Can't open file: %s" it)))))
|
||||||
;; Filter buffers (i.e. select items)
|
;; Filter buffers (i.e. select items)
|
||||||
(--map (with-current-buffer it
|
(--map (with-current-buffer it
|
||||||
|
(unless (derived-mode-p 'org-mode)
|
||||||
|
(user-error "Not an Org buffer: %s" (buffer-name)))
|
||||||
(org-ql--select-cached :predicate predicate :action action :narrow narrow)))
|
(org-ql--select-cached :predicate predicate :action action :narrow narrow)))
|
||||||
;; Flatten items
|
;; Flatten items
|
||||||
(-flatten-n 1))))
|
(-flatten-n 1))))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue