From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: [BUG] Duplicate characters in help string when filtering by tag Date: Fri, 10 Aug 2018 21:51:24 -0500 Message-ID: <87a7pt39ar.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foK02-0007Vk-Vg for emacs-orgmode@gnu.org; Fri, 10 Aug 2018 22:51:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1foJzz-0002Yf-RU for emacs-orgmode@gnu.org; Fri, 10 Aug 2018 22:51:31 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:56033) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1foJzz-0002Xx-L3 for emacs-orgmode@gnu.org; Fri, 10 Aug 2018 22:51:27 -0400 Received: from archthink (c-76-16-135-119.hsd1.il.comcast.net [76.16.135.119]) by mail.messagingengine.com (Postfix) with ESMTPA id 55346E454E for ; Fri, 10 Aug 2018 22:51:25 -0400 (EDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Org Mode I'm finding that when I call org-agenda-filter-by-tag, the string of character hints is long, with lots of duplicates. E.g., Filter by tag [hpcwhpcwhpcwhpcwhpcwhpcwhpcwhpcwhpcwhpcw ]:tag-char, [TAB]:t= ag, [/]:off, [+/-]:filter/exclude, [q]:quit [3 times] A git bisect reveals that this bug began with commit 2056b60aae528d0ba663d8b3804dc69e98993f1c. After a bit of investigating, I've found the cause: org--tag-add-to-alist no longer removes duplicate tags if they belong in a tag group.=20 Let me provide a minimal example to illustrate. Take the following setting: (setq org-tag-alist '((:startgroup) ("home" . ?h) ("phone" . ?p) ("computer" . ?c) ("work" . ?w) (:endgroup))) If one has 10 agenda files (none of which has a local #+TAGS declaration), org-tag-alist-for-agenda will end up containing those tags multiple times: --8<---------------cut here---------------start------------->8--- org-tag-alist-for-agenda is a variable defined in =E2=80=98org.el=E2=80=99. Its value is (#1=3D(:startgroup) #2=3D("home" . 104) #3=3D("phone" . 112) #4=3D("computer" . 99) #5=3D("work" . 119) #6=3D(:endgroup) #1# #2# #3# #4# #5# #6# #1# #2# #3# #4# #5# #6# #1# #2# #3# #4# #5# #6#= #1# #2# #3# #4# #5# #6# #1# #2# #3# #4# #5# #6# #1# #2# #3# #4# #5# #6# #1= # #2# #3# #4# #5# #6# #1# #2# #3# #4# #5# #6# #1# #2# #3# #4# #5# #6#) --8<---------------cut here---------------end--------------->8--- As a result, the help prompt for org-filter-tags-for-agenda looks like this (notice the duplicate characters): Filter by tag [hpcwhpcwhpcwhpcwhpcwhpcwhpcwhpcwhpcwhpcw ]:tag-char, [TAB]:t= ag, [/]:off, [+/-]:filter/exclude, [q]:quit [3 times] Best, Matt