diff --git a/lisp/org.el b/lisp/org.el index 3eb79fbf8..a5a32c936 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -13465,7 +13465,7 @@ With prefix ARG, realign all tags in headings in the current buffer." current-tags inherited-tags table (if org-fast-tag-selection-include-todo org-todo-key-alist)) - (let ((org-add-colon-after-tag-completion t)) + (let ((org-add-colon-after-tag-completion (< 1 (length table)))) (org-trim (org-icompleting-read "Tags: " 'org-tags-completion-function @@ -13749,9 +13749,10 @@ Returns the new tags string, or nil to not change the current settings." (condition-case nil (setq tg (org-icompleting-read "Tag: " - (or buffer-tags - (with-current-buffer buf - (org-get-buffer-tags))))) + (append (or buffer-tags + (with-current-buffer buf + (org-get-buffer-tags))) + (mapcar 'car table)))) (quit (setq tg ""))) (when (string-match "\\S-" tg) (add-to-list 'buffer-tags (list tg))