emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Tina Russell <tinakellyrussell@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Mutually-exclusive Org tags still inherit each other
Date: Sat, 09 Feb 2019 19:03:41 +0100	[thread overview]
Message-ID: <874l9cdeki.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAJBHbT6uZc4SuLpdkk_VkVs4itQOcw_9rwBDe8+GKe17ydYF5w@mail.gmail.com> (Tina Russell's message of "Thu, 7 Feb 2019 16:42:22 -0800")

Hello,

Tina Russell <tinakellyrussell@gmail.com> 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	other threads:[~2019-02-09 18:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08  0:42 Mutually-exclusive Org tags still inherit each other Tina Russell
2019-02-09 18:03 ` Nicolas Goaziou [this message]
2019-03-01 21:47   ` Tina Russell
2019-03-04  9:48     ` Nicolas Goaziou

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=874l9cdeki.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=tinakellyrussell@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).