emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Help needed with subtree export
@ 2023-02-20 15:49 Alain.Cochard
  0 siblings, 0 replies; only message in thread
From: Alain.Cochard @ 2023-02-20 15:49 UTC (permalink / raw)
  To: emacs-orgmode


I only recently discovered subtree export, which I thought would be
better suited for me, but I have trouble to switch.

Consider the following file:

   #+SELECT_TAGS: export conditional
   #+EXCLUDE_TAGS: 

   #+OPTIONS: toc:nil title:nil author:nil date:nil tags:nil

   * I  :export:
   ** 1
   ** 2
   ** nth
   *** conditional :conditional:
   * II

If I use 'C-c C-e l o', I have everything under '* I' exported. If I
transfer 'conditional' from '#+SELECT_TAGS:' to '#+EXCLUDE_TAGS:', I
have everything under '* I' except the '*** conditional' headline.
This is want I want: be able to selectively include/exclude the
headlines with the ':conditional:' tag by simply transferring
'conditional'.

Now, if I use 'C-c C-e C-s l o' on '* I', it gives the same as above
when 'conditional' belongs to '#+EXCLUDE_TAGS:' but, after the
transfer of 'conditional' to '#+SELECT_TAGS:', only the '** nth'
headline is exported.

Is there a convenient way to achieve my goal?  Sure, I can put an
':export:' tag on '** 1', '** 2', and '** nth', but it is not very
practical.  I can also introduce a 'fake' headline and subtree export
it instead:

   * fake
   ** I :export:
   *** 1
   *** 2
   *** nth
   **** conditional :conditional:
   * II

but I don't like this workaround either.

Thanks in advance


PS: I have a minor comment about the manual: when reading the following

   ‘SELECT_TAGS’
        The default value is ‘("export")’.  [...]

   ‘EXCLUDE_TAGS’
        The default value is ‘("noexport")’.  [...]

I find it difficult to anticipate what will happen when there is no
tag at all.

-- 
EOST (École et Observatoire des Sciences de la Terre) 
ITE (Institut Terre & Environnement) | alain.cochard@unistra.fr
5 rue René Descartes   [bureau 110]  | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France     | [ slot available for rent ]



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-20 15:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-20 15:49 Help needed with subtree export Alain.Cochard

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).