From: Ihor Radchenko <yantar92@posteo.net>
To: sebastien.miquel@posteo.eu
Cc: emacs-orgmode <emacs-orgmode@gnu.org>, Timothy <tecosaur@gmail.com>
Subject: Re: [PATCH] Introduce "export features"
Date: Mon, 27 Feb 2023 19:05:33 +0000 [thread overview]
Message-ID: <87v8jnx72a.fsf@localhost> (raw)
In-Reply-To: <f1237e84-dfb8-c724-7786-a3c009a38694@posteo.eu>
Sébastien Miquel <sebastien.miquel@posteo.eu> writes:
> Ihor Radchenko writes:
>>>> The traditional user-facing approach for toggling staff in export is
>>>> setting export options.
>>> Indeed. Then I suggest that such use be described in the manual.
>>> Having the user create a whole new option in order to toggle a
>>> `chikenize` package seems a bit unwieldy, however.
>> What do you suggest instead of creating a new option?
>
> Timothy's patch supports having a feature depend on a variable. I was
> thinking here of a user variable (instead of an already defined org
> variable) that could be toggled per document.
>
> It is fairly orthogonal to the original purpose of the patch, but it
> does scratch an annoying itch of mine: there's very little support in
> org to minutely tweak the export on a per document basis, beyond the
> default options.
Defining a new option is easy:
(org-export-define-derived-backend 'my-html 'html
:options-alist
'((:my-option "MY_OPTION_KEYWORD" nil "my-option" my-option-variable)))
Then, you can either
#+:BIND: my-option-variable t
or
#+OPTIONS: my-option:t
or
#+MY_OPTION_KEYWORD: t
Of course, you will also need to plug support of :my-option as needed
via filters or altering transcoders.
Timothy, since you are going to provide a macro for altering the
existing backends, it would also make sense to generalize it for
altering other aspects of the backends, like option-alist,
filters-alist, and menu-entry.
> One way to do this (easier than setting up a new option), is to define
> any variable, make the feature depend on it, and set it using the
> `#+bind` keyword. Combined with these export features, this could be
> used to easily tweak the LaTeX preamble, per document.
>
> If we find this use case to be legitimate and useful, I suggested
> earlier making it even easier with a `#+org_export_features` keyword.
> It would only take a list of feature names, and not require any
> variable tied to the feature.
I do not see much point compared to option alist, which is more
flexible. And you can always define a feature with condition to match
against "#\\+org_export_features.+my-feature".
--
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>
next prev parent reply other threads:[~2023-02-27 19:06 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 17:20 [PATCH] Introduce "export features" Timothy
2023-02-11 11:37 ` Ihor Radchenko
2023-02-20 17:41 ` Timothy
2023-02-24 12:51 ` Sébastien Miquel
2023-02-24 12:59 ` Ihor Radchenko
2023-02-24 21:47 ` Sébastien Miquel
2023-02-26 12:19 ` Ihor Radchenko
2023-02-26 13:04 ` Sébastien Miquel
2023-02-27 19:05 ` Ihor Radchenko [this message]
2023-02-25 3:15 ` Timothy
2023-02-21 14:22 ` [POLL] Naming of " Timothy
2023-02-22 1:46 ` Dr. Arne Babenhauserheide
2023-02-22 2:40 ` Timothy
2023-02-23 15:55 ` No Wayman
2023-02-23 16:17 ` No Wayman
2023-02-22 12:23 ` Ihor Radchenko
2023-02-23 15:31 ` No Wayman
2023-02-23 16:04 ` Bruce D'Arcus
2023-02-23 19:04 ` Ihor Radchenko
2023-02-23 19:55 ` Sébastien Miquel
2023-02-24 10:27 ` Ihor Radchenko
2023-02-24 12:46 ` Sébastien Miquel
2023-02-24 13:03 ` Ihor Radchenko
2023-02-24 21:38 ` Sébastien Miquel
2023-02-26 12:28 ` Ihor Radchenko
2023-02-26 14:06 ` Sébastien Miquel
2023-02-27 19:32 ` Ihor Radchenko
[not found] <mailman.13.1676134175.1258.emacs-orgmode@gnu.org>
2023-02-11 17:03 ` [PATCH] Introduce " No Wayman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v8jnx72a.fsf@localhost \
--to=yantar92@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=sebastien.miquel@posteo.eu \
--cc=tecosaur@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.