summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Lundin <mdl@imapmail.org>2018-03-19 09:53:15 -0500
committerBastien <bzg@gnu.org>2018-03-21 00:56:25 +0100
commit393b98ae8efc45f90afb4a92399e687847f01ac2 (patch)
tree01771929bcd8faf9c9565a3adfcbdcc070cc5b9c
parentb0cca9656da861592c6342e03a3572fd07adb635 (diff)
downloadorg-mode-393b98ae8efc45f90afb4a92399e687847f01ac2.tar.gz
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.
-rw-r--r--lisp/org.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/org.el b/lisp/org.el
index af2e546..e686793 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -14331,10 +14331,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))))))))