[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] excluding whole trees on export when subtrees have "select" tags
Re: [O] excluding whole trees on export when subtrees have "select" tags present
Wed, 11 Jan 2017 21:26:29 +0100
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
Eric S Fraga <address@hidden> writes:
> On Tuesday, 10 Jan 2017 at 14:27, John Kitchin wrote:
>> This does not sound right to me.
>> This org file:
>> #+BEGIN_SRC org
>> ,#+select_tags: wanted
>> ,#+exclude_tags: notwanted
>> ,* headline
>> some text
>> ,** subhead 1
>> ,** subhead2
>> more text
>> should not have any thing to export.
> Yes, and it works. However, if I don't explicitly specify "notwanted"
> as excluded, the whole file is exported. I guess I don't understand the
> meaning of "select_tags": I would like this to specify those trees to be
> exported only if the given tags are present.
This is what select tags do, but the tree starts at top-level. Any tree
that _contains_ a select tag is exported as a whole. See
You want to use select tags to get parts of trees, i.e. sub-trees. For
** SH1 :wanted:
*** SSH1 :wanted:
would become morally equivalent to
* SH1 :wanted:
* SSH1 :wanted:
This is not possible.
I had a patch for that, but I never got to apply it because it seemed
very hackish. Also, you can do the same in a hook, where a function
would delete any entry not tagged "wanted" prior to export.