From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viktor Rosenfeld Subject: Re: [BUG] Hotkeys defined in org-tag-alist repeated in agenda filter dispatcher Date: Mon, 22 Apr 2013 14:01:32 +0200 Message-ID: <20130422120132.GF7821@cartman> References: <20130422015030.GB7821@cartman> <87li8aapbq.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUFho-0002Xc-OY for emacs-orgmode@gnu.org; Mon, 22 Apr 2013 08:18:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUFdV-00008a-En for emacs-orgmode@gnu.org; Mon, 22 Apr 2013 08:14:27 -0400 Content-Disposition: inline In-Reply-To: <87li8aapbq.fsf@bzg.ath.cx> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org Hi Bastian, Bastien wrote: > Hi Viktor, > > Viktor Rosenfeld writes: > > > If I hit the =/= key in the agenda to filter the agenda by tag, the > > hotkeys defined in the list above are repeated multiple times. > > Can you test this patch against latest maint or master branch? The problem still remains with the patch. However, I was able to narrow the problem to a specific line and can provide a minimal example: Consider the following configuration (which is loaded in init.el via org-babel-load-file): #+BEGIN_SRC emacs-lisp (global-set-key (kbd "") 'org-agenda) (setq org-agenda-files '( "~/org/dokumente.org" "~/org/openloops.org" "~/org/routine.org" "~/org/arbeit.org" )) (setq org-tag-alist '((:startgroup . nil) ("@home" . ?h) ("@comp" . ?c) ("@otg" . ?o) ("@fon" . ?f) ("@agenda" . ?a) ("@read" . ?r) ("@write" . ?w) (:endgroup . nil) (:startgroup . nil) ("IMPORTANT" . ?*) ("SOMEDAY" . ??) (:endgroup . nil))) #+END_SRC The four agenda files are as follows: The first file, "dokumente.org" caontains a single headline and a #+TAGS: definition: #+BEGIN_SRC org :tangle dokumente.org #+TAGS: foo * 1996 #+END_SRC The other three files only contain a heading and no #+TAGS: definition: #+BEGIN_SRC org :tangle openloops.org * Inbox #+END_SRC #+BEGIN_SRC org :tangle routine.org * Review #+END_SRC #+BEGIN_SRC org :tangle arbeit.org * 1996 #+END_SRC With this setup the tag hotkeys are repeated three times, one time for each file with no tags definition. If I remove the #+TAGS definition in dokumente.org, the bug disappears. If I add a #+TAGS definition to every other file, then no tag hotkeys are printed, which is another unexpected behavior. In other words, the presence of #+TAGS in a file causes the tag hotkeys to repeated once for every file which does not have a #+TAGS definition. To achieve the correct behavior, either no #+TAGS: definition must appear anywhere or there must be exactly one file without a #+TAGS definition. Note that the number of repetions also depends on where the file with the #+TAGS definition is located in the org-agenda-files list. Using the four files above, if I move the file dokumente.org with the #+TAGS definition to the end of the list then there are no repetitions. Cheers, Viktor > > Thanks, >