From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: org-tag-alist and org-tag-persistent-alist Date: Mon, 20 Jan 2014 13:07:43 +0100 Message-ID: <87k3du97qo.fsf@bzg.ath.cx> References: <8738ks6gcu.fsf@cfr5.giovanni.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5Ddx-0005YT-4t for emacs-orgmode@gnu.org; Mon, 20 Jan 2014 07:07:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5Ddr-0000f2-E8 for emacs-orgmode@gnu.org; Mon, 20 Jan 2014 07:07:53 -0500 Received: from mail-wg0-x232.google.com ([2a00:1450:400c:c00::232]:57006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5Ddr-0000ey-6o for emacs-orgmode@gnu.org; Mon, 20 Jan 2014 07:07:47 -0500 Received: by mail-wg0-f50.google.com with SMTP id l18so6828268wgh.29 for ; Mon, 20 Jan 2014 04:07:46 -0800 (PST) In-Reply-To: <8738ks6gcu.fsf@cfr5.giovanni.org> (giovanni bono's message of "Sun, 12 Jan 2014 22:27:13 +0100") 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: giovanni bono Cc: emacs-orgmode@gnu.org Hi Giovanni, giovanni bono writes: > i would appreciate help in understanding the difference between > `org-tag-alist' and `org-tag-persistent-alist'. org-tag-alist goes with the #+TAGS in-buffer option. Inserting #+TAGS then completing by hitting TAB will complete using org-tag-alist, not org-tag-persistent-alist. org-tag-persistent-alist is the same across buffers. Whether it is taken into account depends on a #+STARTUP keyword, like other generic options. #+STARTUP: noptag will prevent using persistent tags in this buffer. > the docstrings suggest that the first defines "allowed" tags, while the > second is for "always present" tags. the info seems to mention both > only wrt completing tags for interactive insertion. they sure behave > differently. i am keeping a lot of files in `org-agenda-files' --more > than 100-- and i am using many tags. while harvesting tags to clean > them up, for some reason i switched from the the persistent to the non > persistent alist variable. as a result, `org-agenda-list' failed to > terminate in ten minutes, as opposed to the usual 2 seconds. going back > to the persistent alist variable fixes the problem. this looks strange > also because there is a `org-tag-alist-for-agenda'. You should not worry about `org-tag-alist-for-agenda', Org builds it for you. But having a lot of agenda files and a lot of tags means that it will take long to build the complete list of tags (because this list will be built dynamically, traversing all the buffers). > i am not sure whether this warrants submitting a bug. my unfounded > guess is that `org-tag-alist' is there to pave the way for a facility to > keep tags growth in check --by signaling where one used non allowed > tags, for instance. by the way, that would be very nice. another > somewhat baseless guess is that `org-global-tags-completion-table' might > be causing the problem, as it uses two nested mapcar over agenda files > and `org-tag-alist'. I think there are a few glitches in the interaction between those two variables (for example, if you have a tag in both org-tag-alist and org-tag-persistent-alist, it is displayed twice... which is a bug.) The best we can do here is to try to nail down those glitches very precisely. Please do so if you find some. As for agenda building performance, make sure you read this: http://orgmode.org/worg/agenda-optimization.html HTH, -- Bastien