emacs-orgmode
[Top][All Lists]
Advanced

[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: Sat, 09 Feb 2019 19:03:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hello,

Tina Russell <address@hidden> writes:

> So, according to the Org documentation: “You can also group together tags
> that are mutually exclusive by using braces … Selecting a tag in a group of
> mutually exclusive tags will turn off any other tags from that group.
>
> But, if I do this…
>
> #+TAGS: { place(c) container(c) object(o) }
>
> * Room :place:
> ** Box :container:
> *** Toy :object:
>
> …and then use (org-get-tags) on “Toy,” it reports that it has the tags
> “place”, “container”, and “object”, even though these tags are all defined
> to be mutually exclusive! This is a problem,

Not really. `org-get-tags' is a low-level function, i.e., it has no
knowledge about tag groups or mutually exclusive tags.

> since turning off tag
> inheritance (for a document or for specific tags) seems to be an
> all-or-nothing affair. That means if I wanted to do this:
>
> * Room :place:
> ** Bookcase
> ** Dresser
> ** Desk
> ** Nightstand
> ** Closet
> *** Box :container:
> **** Toy :object:
>
> …and then search for all headings with the tag “place,” either (with tag
> inheritance) everything, including “Box” and “Toy,” will be returned, or
> (without tag inheritance) only “Room” would be returned. (I could put a tag
> on every heading where I want it inherited, but that would both defeat the
> purpose of inheritance and make it difficult to manage large trees.)

You don't need to use mutually exclusive tags for this example. You
could search for "place-container", assuming tag inheritance.

Regards,

-- 
Nicolas Goaziou



reply via email to

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