From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anupam Sengupta Subject: Re: [BUG] Tag selection is inconsistent when loaded from #+SETUPFILE in orgmode 8.0.x Date: Thu, 23 May 2013 20:33:33 -0400 Message-ID: References: <8761yj1fvz.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uffx7-0005K8-AT for emacs-orgmode@gnu.org; Thu, 23 May 2013 20:33:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uffx2-0006iR-Fi for emacs-orgmode@gnu.org; Thu, 23 May 2013 20:33:49 -0400 In-Reply-To: <8761yj1fvz.fsf@bzg.ath.cx> (Bastien's message of "Thu, 16 May 2013 10:35:28 +0200") 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 --=-=-= Content-Type: text/plain Hi Bastien, >> Loading tags from a #+SETUPFILE is causing inconsistent behavior >> in the tag-selection for both in-buffer selection via C-c C-q >> (`org-set-tags-command`) and in-agenda selection via : >> (`org-agenda-set-tags`). Bastien> Thanks a lot for reporting this and for the test case, it Bastien> should be fixed now. Bastien> All: the fix involves checking for a #+setupfile directive Bastien> when processing Org buffers for building the agenda. This Bastien> may lead to some slow down when your agenda is built from Bastien> many files. Let me know if you notice some weirdness. Thanks a lot for the fix. The test files are now behaving properly after the fix (I am on orgmode git development head at commit 36848fdec9eb8c9c17a2e98cd742af1f9f9b23db as on 23rd May). *However*, while testing this fix, I think I have uncovered a few more bugs(?) with the +SETUPFILE interaction with the in-buffer tag selection. Specifically, if the +SETUPFILE contains /any/ of the following directives (not exhaustive, just what my setup happened to have), then the tag listing in the completion buffer is showing _duplicated lists_ of the tags read from the setup file: +STARTUP +OPTIONS +TYP_TODO +CHOOSE_TODO I have expanded the test case to include this scenario: The setup file ============== --=-=-= Content-Type: text/plain Content-Disposition: inline Content-Description: setup.org ##+STARTUP: align ##+OPTIONS: timestamp:t ##+TYP_TODO: TODO(t) DELEGATED(l!) | DONE(d) ##+CHOOSE_TODO: NO(,-) YES(,0) #+TAGS: { @work(w) @home(h) } --=-=-= Content-Type: text/plain The test orgmode file ===================== --=-=-= Content-Type: text/plain Content-Disposition: inline Content-Description: test.org #+SETUPFILE: ~/setup.org #+TAGS: call(l) email(e) * The top entry :@work:call: SCHEDULED: <2013-05-14 Tue> --=-=-= Content-Type: text/plain Note that in the setup file, I have commented out every option other than +STARTUP and +TAGS. In this case, the in-buffer tag selection results in a tag selection display of: ------------------------------------------------------------ Inherited: Current: @work call [l] call [e] email { [w] @work [h] @home } { [w] @work [h] @home } <----- Note the duplicated listing ------------------------------------------------------------ If you comment the +STARTUP option in the setup.org file, then the tag selection behaves as expected. Alternatively, if you enable any of the other options, then the issue reoccurs. Thanks! -- Anupam --=-=-=--