Browse Source

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.
Matt Lundin 7 years ago
parent
commit
393b98ae8e
1 changed files with 5 additions and 4 deletions
  1. 5 4
      lisp/org.el

+ 5 - 4
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))))))))