Browse Source

Remove duplicate selection letters from tag filter prompt.

* lisp/org-agenda.el (org-agenda-filter-by-tag): Remove duplicate
selection letters from tag filter prompt.  If tag groups were the same
in multiple agenda files, the selection characters would be repeated
in the prompt.
Carsten Dominik 5 years ago
parent
commit
96cc762ff3
1 changed files with 6 additions and 2 deletions
  1. 6 2
      lisp/org-agenda.el

+ 6 - 2
lisp/org-agenda.el

@@ -7562,10 +7562,14 @@ should be used to exclude the search - the interactive user can
 also press `-' or `+' to switch between filtering and excluding."
   (interactive "P")
   (let* ((alist org-tag-alist-for-agenda)
+	 (seen-chars nil)
 	 (tag-chars (mapconcat
 		     (lambda (x) (if (and (not (symbolp (car x)))
-					  (cdr x))
-				     (char-to-string (cdr x))
+					  (cdr x)
+					  (not (member (cdr x) seen-chars)))
+				     (progn
+				       (push (cdr x) seen-chars)
+				       (char-to-string (cdr x)))
 				   ""))
 		     org-tag-alist-for-agenda ""))
 	 (valid-char-list (append '(?\t ?\r ?/ ?. ?\s ?q)