[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Mutually-exclusive Org tags still inherit each other

From: Nicolas Goaziou
Subject: Re: [O] Mutually-exclusive Org tags still inherit each other
Date: Mon, 04 Mar 2019 10:48:19 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)


Tina Russell <address@hidden> writes:

> Well, I think it’s unreasonable to ask users to reinforce manually and
> continuously something they’ve already specified in their settings.
> Besides, my example was intentionally trivial—imagine managing a large
> tree and having to remember which tags are mutually exclusive to what,
> all the time.
> But, no matter! I have created a patch! It works great, even for edge
> cases like when an entry has two tags that are set as mutually
> exclusive to each other.

Thank you for the patch.

Unfortunately, I think we are miscommunicating, because we are thinking
at different levels of abstraction. Le me clarify this.

Org syntax supports colons-wrapped cookies at the end of a headline,
called tags. That's about it. Of course, you can extend those cookies to
support, e.g., inheritance, groups, mutual exclusion, and whatnot. But
at the lowest level, there are only cookies at the end of a headline.

The function `org-get-tags' was implemented to get those, possibly with
inheritance. Most, if not all, of its callers in the code base do not
care about groups, or mutual exclusion. Also, most, if not all, callers
care about internal tags. Not that some internal tags are automatically
inherited, hence support for this mechanism in `org-get-tags'.

You apparently have a need for user-defined tags, with all bells and
whistles. However, IIUC, you don't really need to list them, but
ultimately do a tag search on them. 

There are advanced functions for tag searches: `org-make-tags-matcher'
and `org-scan-tags'. My point is that you should first check if they
already do what you want, and patch them otherwise, instead of changing
`org-get-tags', which has a clear scope.



Nicolas Goaziou

reply via email to

[Prev in Thread] Current Thread [Next in Thread]