emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: giovanni bono <giovanni.bono.70@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-tag-alist and org-tag-persistent-alist
Date: Mon, 20 Jan 2014 13:07:43 +0100	[thread overview]
Message-ID: <87k3du97qo.fsf@bzg.ath.cx> (raw)
In-Reply-To: <8738ks6gcu.fsf@cfr5.giovanni.org> (giovanni bono's message of "Sun, 12 Jan 2014 22:27:13 +0100")

Hi Giovanni,

giovanni bono <giovanni.bono.70@gmail.com> 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

      reply	other threads:[~2014-01-20 12:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-12 21:27 org-tag-alist and org-tag-persistent-alist giovanni bono
2014-01-20 12:07 ` Bastien [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k3du97qo.fsf@bzg.ath.cx \
    --to=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=giovanni.bono.70@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).