Fix: (org-ql-find) Check major mode
See https://github.com/alphapapa/org-ql/issues/284#issuecomment-1185367899.
This commit is contained in:
parent
a986e360c3
commit
98b6049ecc
1 changed files with 4 additions and 1 deletions
|
|
@ -110,7 +110,10 @@ single predicate)."
|
||||||
(cl-remove-if-not (lambda (buffer)
|
(cl-remove-if-not (lambda (buffer)
|
||||||
(eq 'org-mode (buffer-local-value 'major-mode buffer)))
|
(eq 'org-mode (buffer-local-value 'major-mode buffer)))
|
||||||
(buffer-list))) nil t))
|
(buffer-list))) nil t))
|
||||||
(current-buffer))))
|
(progn
|
||||||
|
(unless (eq major-mode 'org-mode)
|
||||||
|
(user-error "This is not an Org buffer: %S" (current-buffer)))
|
||||||
|
(current-buffer)))))
|
||||||
;; Emacs's completion API is not always easy to understand,
|
;; Emacs's completion API is not always easy to understand,
|
||||||
;; especially when using "programmed completion." This code was
|
;; especially when using "programmed completion." This code was
|
||||||
;; made possible by the example Clemens Radermacher shared at
|
;; made possible by the example Clemens Radermacher shared at
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue