From 647396464d563634b980127673cf61769663407e Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Tue, 27 Mar 2012 12:09:02 +0200 Subject: [PATCH 1/2] org.el: Include tags from `org-tag-alist' when completing with the TAB key. * org.el (org-fast-tag-selection): Include tags from `org-tag-alist' when completing with the TAB key. Thanks to Mike McLean for reporting this problem. --- lisp/org.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index f1a4b9557..e39b60b92 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -13691,9 +13691,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)) From d069301060278589782a148745e40e9b2c11c6b7 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Tue, 27 Mar 2012 12:10:14 +0200 Subject: [PATCH 2/2] org.el: Don't add a column when there is only one tag offered for completion. * org.el (org-set-tags): Don't add a column when there is only one tag offered for completion. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index e39b60b92..06c9cf4ca 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -13407,7 +13407,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