emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Feature request: exclude sub-trees by backend
@ 2024-02-22 17:53 Edgar Lux
  2024-02-23 13:38 ` Ihor Radchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Edgar Lux @ 2024-02-22 17:53 UTC (permalink / raw)
  To: Emacs Orgmode

Hello!

I am trying to exclude different sub-trees (a.k.a. headings or sections), depending on the exporter backend. I am familiar with =:noexport:= to exclude selected sections (disregarding the backend). I found a solution, but it is only intended for a specific backend:

https://emacs.stackexchange.com/a/76454

I would like to recommend that such a thing is implemented for any backend. So that :noexport_X: (where X is a backend) is excluded. Something like:

* Not for html   :noexport_html:

* For HTML       :noexport_latex:

Thank you!



-- 
Sent with https://mailfence.com  
Secure and private email


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Feature request: exclude sub-trees by backend
  2024-02-22 17:53 Feature request: exclude sub-trees by backend Edgar Lux
@ 2024-02-23 13:38 ` Ihor Radchenko
       [not found]   ` <758407511.383424.1708866458059@fidget.co-bxl>
  0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2024-02-23 13:38 UTC (permalink / raw)
  To: Edgar Lux; +Cc: Emacs Orgmode

Edgar Lux <edgarlux@mailfence.com> writes:

> I am trying to exclude different sub-trees (a.k.a. headings or sections), depending on the exporter backend. I am familiar with =:noexport:= to exclude selected sections (disregarding the backend). I found a solution, but it is only intended for a specific backend:
>
> https://emacs.stackexchange.com/a/76454

For arbitrary backend, you can try

(defun exclude-from-latex-export-hook (backend)
  (setq org-export-exclude-tags (cons (format "noexport_%s" backend) org-export-exclude-tags)))

> I would like to recommend that such a thing is implemented for any backend. So that :noexport_X: (where X is a backend) is excluded. Something like:
>
> * Not for html   :noexport_html:
>
> * For HTML       :noexport_latex:

This is not a feature request I see often in the forums.
It is also easy to implement.
I think that it would be ok to add such feature if multiple users are interested.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Feature request: exclude sub-trees by backend
       [not found]   ` <758407511.383424.1708866458059@fidget.co-bxl>
@ 2024-02-26 16:51     ` Ihor Radchenko
  2024-03-27 14:35       ` Edgar Lux
  0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2024-02-26 16:51 UTC (permalink / raw)
  To: Edgar Lux; +Cc: emacs-orgmode

[ Adding Org mailing list back to CC. ]

Edgar Lux <edgarlux@mailfence.com> writes:

> ...
>> I think that it would be ok to add such feature if multiple users are
>> interested.
>
> Similar (and may be the ignore-heading from ox-extra should also become standard, because I found it a lot):
>
> https://emacs.stackexchange.com/a/75510
> https://emacs.stackexchange.com/a/75573
> https://emacs.stackexchange.com/a/60016

The suggestions to use backend-specific export tag in the links are used
as ugly workarounds. I am not sure if they justify adding a new feature
for Org mode. (Why would we add something with a purpose of being used
as a workaround instead of fixing the original problem, after all?)

As for ignore-heading, please search list archives - adding this feature
has been discussed many times and the author of Org export system
repeatedly opposed it. This is why:
https://list.orgmode.org/87mwdfzmox.fsf@nicolasgoaziou.fr/

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Feature request: exclude sub-trees by backend
  2024-02-26 16:51     ` Ihor Radchenko
@ 2024-03-27 14:35       ` Edgar Lux
  2024-03-28  8:08         ` Ihor Radchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Edgar Lux @ 2024-03-27 14:35 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

Hi, I had a need for this again (sorry for the necro-bump).

On Feb 26, 2024 at 5:51 PM, Ihor Radchenko <yantar92@posteo.net> wrote:
> The suggestions to use backend-specific export tag in the links are used
> as ugly workarounds...

Ok. It was just to show that there are other people who may use it :) .

> As for ignore-heading, ...
> ... the author of Org export system
> repeatedly opposed it. This is why:
> https://list.orgmode.org/87mwdfzmox.fsf@nicolasgoaziou.fr/

Ok. Sorry. I should have assumed (or looked for) that there was a reason :) .

-- 
Sent with https://mailfence.com  
Secure and private email


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Feature request: exclude sub-trees by backend
  2024-03-27 14:35       ` Edgar Lux
@ 2024-03-28  8:08         ` Ihor Radchenko
  0 siblings, 0 replies; 5+ messages in thread
From: Ihor Radchenko @ 2024-03-28  8:08 UTC (permalink / raw)
  To: Edgar Lux; +Cc: emacs-orgmode

Edgar Lux <edgarlux@mailfence.com> writes:

> Hi, I had a need for this again (sorry for the necro-bump).

One month is perfectly normal reply time by mailing list standards :)
We just start questioning whether the discussion is active after one month.

> On Feb 26, 2024 at 5:51 PM, Ihor Radchenko <yantar92@posteo.net> wrote:
>> The suggestions to use backend-specific export tag in the links are used
>> as ugly workarounds...
>
> Ok. It was just to show that there are other people who may use it :) .

Note that we are currently discussing somewhat similar idea, but for all
the Org markup elements, not just headings:
https://list.orgmode.org/877chvvq1b.fsf_-_@posteo.net/T/#madc064d96ae66467adc2ea9adb53c6c0edc7aaf7

>> As for ignore-heading, ...
>> ... the author of Org export system
>> repeatedly opposed it. This is why:
>> https://list.orgmode.org/87mwdfzmox.fsf@nicolasgoaziou.fr/
>
> Ok. Sorry. I should have assumed (or looked for) that there was a reason :) .

To be fair, it would be nice to include :ignore: tag as a part of the
Org. However, we need to somehow make sure that nothing unexpected
happens when users use :ignore: in a context where it does not make
sense:

* Heading
** Sub-heading
Text.
* Ignored :ignore:
Merging this text with previous sub-heading is unexpected.

If you have ideas how to address such scenarios, feel free to share
them.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-28  8:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-22 17:53 Feature request: exclude sub-trees by backend Edgar Lux
2024-02-23 13:38 ` Ihor Radchenko
     [not found]   ` <758407511.383424.1708866458059@fidget.co-bxl>
2024-02-26 16:51     ` Ihor Radchenko
2024-03-27 14:35       ` Edgar Lux
2024-03-28  8:08         ` Ihor Radchenko

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