>From fc09bce2c9efe72a340132a499510658cd03bec2 Mon Sep 17 00:00:00 2001 From: Matt Lundin Date: Mon, 19 Mar 2018 09:53:15 -0500 Subject: [PATCH] Include buffer tags in global tags completion * lisp/org.el: (org-global-tags-completion-table): Return all tags, including tags in the buffer. This fixes a bug that caused buffer tags to be excluded if user configured tags either via org-tag-alist or the #+TAGS keyword. --- lisp/org.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 73ab32aa0..44b57a60d 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -13724,10 +13724,11 @@ instead of the agenda files." (mapcar (lambda (file) (set-buffer (find-file-noselect file)) - (mapcar (lambda (x) - (and (stringp (car-safe x)) - (list (car-safe x)))) - (or org-current-tag-alist (org-get-buffer-tags)))) + (append (org-get-buffer-tags) + (mapcar (lambda (x) + (and (stringp (car-safe x)) + (list (car-safe x)))) + org-current-tag-alist))) (if (car-safe files) files (org-agenda-files)))))))) -- 2.16.2