Browse Source

Remove duplicate candidates when setting tags

* lisp/org.el (org-set-tags): Remove duplicate candidates from menu.
Nicolas Goaziou 9 years ago
parent
commit
77b4fad528
1 changed files with 8 additions and 7 deletions
  1. 8 7
      lisp/org.el

+ 8 - 7
lisp/org.el

@@ -15025,13 +15025,14 @@ When JUST-ALIGN is non-nil, only align tags."
 		    (let* ((table
 			    (setq
 			     org-last-tags-completion-table
-			     (append
-			      org-tag-persistent-alist
-			      (or org-tag-alist (org-get-buffer-tags))
-			      (and
-			       org-complete-tags-always-offer-all-agenda-tags
-			       (org-global-tags-completion-table
-				(org-agenda-files))))))
+			     (delete-dups
+			      (append
+			       org-tag-persistent-alist
+			       (or org-tag-alist (org-get-buffer-tags))
+			       (and
+				org-complete-tags-always-offer-all-agenda-tags
+				(org-global-tags-completion-table
+				 (org-agenda-files)))))))
 			   (current-tags (org-split-string current ":"))
 			   (inherited-tags
 			    (nreverse (nthcdr (length current-tags)