branch: externals/org commit e34b72eec68b8c6633310af006f13023dcf85001 Author: Ihor Radchenko <yanta...@posteo.net> Commit: Ihor Radchenko <yanta...@posteo.net>
org-make-tags-matcher: Do not try collecting tags from non-Org buffers * lisp/org.el (org-make-tags-matcher): When building tag completion table, do not attempt to call `org-get-buffer-tags' when current buffer is not an Org buffer. Reported-by: Colin Baxter <m43...@yandex.com> Link: https://orgmode.org/list/87ilb1fakk....@yandex.com --- lisp/org.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index fdf58c3f7e..36235322d2 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -11288,7 +11288,8 @@ See also `org-scan-tags'." ;; tags table and the local tags in current buffer. (let ((org-last-tags-completion-table (org--tag-add-to-alist - (org-get-buffer-tags) + (when (derived-mode-p 'org-mode) + (org-get-buffer-tags)) (unless only-local-tags (org-global-tags-completion-table))))) (setq match