emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] proposal to have ignoreheading tags/properties


From: Aaron Ecay
Subject: Re: [O] proposal to have ignoreheading tags/properties
Date: Sat, 14 Jun 2014 14:07:50 -0400
User-agent: Notmuch/0.17+160~g03680d1 (http://notmuchmail.org) Emacs/24.4.50.4 (x86_64-unknown-linux-gnu)

Hi Nicolas,

Thanks for your thoughts.

2014ko ekainak 14an, Nicolas Goaziou-ek idatzi zuen:
> OTOH, the situation could be improved wrt :export: and :noexport: tags.
> We could allow nesting :export: tags within :noexport: tags with the
> following rule: the :export: headline with the lowest level within
> the :noexport: tree gets promoted to the root of the tree.
> Other :export: headlines have their level set relatively to this one.
> Thus:
> 
>   Text before first headline
>   * H1
>   Body1
>   ** H2 :noexport:
>   Body2
>   *** H3
>   Body3
>   *** H4 :export:
>   Body4
>   **** H5
>   Body5
> 
> will be seen as
> 
>   Text before first headline
>   * H1
>   Body1
>   ** H4
>   Body4
>   *** H5
>   Body5

I’m confused.  In the text, you say “promoted to the root level of the
tree”, which I expect to mean promotion to a top-level headline.  In the
example, though, H4 is promoted to second-level.  Do you mean “promoted
to the level of the highest dominating :noexport: headline”?  That seems
correct to me (but I have not thought about it extensively).

Regardless, I like it very much.

> 
> This is not inlining, since "Body2" is lost anyway, and it may require
> to tag all children of a given headline, but it's already better than
> the current situation, is robust enough for inclusion in core, and
> doesn't require introducing a plethora of new special tags.

I think under your proposal it would be possible to add a single special
tag which is equivalent (by definition) to tagging a headline noexport
and all its children export.  This could be implemented as a parse tree
transformation adding the (no)export tags at an early stage in the export
code.

I agree with Mark and others that “ignore” (or some variant like
“exportignore” or “ignoreheading”) are better names for this tag than
“inline”.  My vote, FWIW, is that the level of sustained user interest
justifies the inclusion of this new tag.  But I hope it will not be too
burdensome, since it just serves as a sort of syntactic sugar and
doesn’t require any substantial new semantics (beyond your proposal for
the extension of (no)export).  To borrow your example, this would look
like:

  Text before first headline
  * H1
  Body1
  ** H2 :ignore:
  Body2
  *** H3
  Body3
  *** H4
  Body4
  **** H5
  Body5

exports to:

  Text before first headline
  * H1
  Body1
  ** H3
  Body3
  ** H4
  Body4
  *** H5
  Body5

(Note lack of “Text2”)

-- 
Aaron Ecay



reply via email to

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