emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Edgar Lux <edgarlux@mailfence.com>
Cc: Emacs Orgmode <emacs-orgmode@gnu.org>
Subject: Re: Feature request: exclude sub-trees by backend
Date: Fri, 23 Feb 2024 13:38:03 +0000	[thread overview]
Message-ID: <87le7bi9ms.fsf@localhost> (raw)
In-Reply-To: <1008678740.100388.1708624390334@fidget.co-bxl>

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>


  reply	other threads:[~2024-02-23 13:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22 17:53 Feature request: exclude sub-trees by backend Edgar Lux
2024-02-23 13:38 ` Ihor Radchenko [this message]
     [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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87le7bi9ms.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=edgarlux@mailfence.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).