[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
Mon, 09 Jan 2017 10:46:58 -0500
mu4e 0.9.19; emacs 220.127.116.11
Based on the docstrings for org-export-select-tags and
org-export-exclude-tags, this looks expected.
It does not look possible to exclude a heading and include a subheading
under it. It is possible to include a heading and exclude some
subheadings though you need a wanted tag in the parent, and notwanted
tags in the subtrees, and to declare the exclude tags.
I am surprised you can use comment like this. It looks to me like
commenting a tree makes all the subtrees in it not export too.
I could see somehow an org-export-before-processing-hook function that
deletes headlines and content you do not want, but it will mess with the
outline, e.g. if you delete "* headline" but leave "** subhead".
I thought I would be able to comment headlines with a hook function like
this, but I could not get it to work. Maybe it is a local problem though.
Eric S Fraga writes:
> Hello all,
> In this very minimal example,
> #+begin_src org
> ,#+select_tags: wanted
> ,* headline :notwanted:
> some text
> ,** subhead :wanted:
> more text
> exporting exports the whole tree under /headline/. I can see why but it
> is arguably the wrong thing to do. If /notwanted/ hasn't been selected,
> I would have assumed that all the contents under that headline would be
> ignored during export.
> My problem is that I want to export a document where certain headlines
> (but not all) are included *and* within these, some subheadlines are
> also included but not all. I would be specifying one or two tags for
> selection depending on the specific export case.
> I can achieve what I want by commenting and uncommenting headlines but
> this is very clumsy and error-prone for my use case.
> I guess I simply want to confirm that the above noted behaviour is
> indeed what is expected from org. If so, I will find a work-around.
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213