From: "Berry, Charles" <ccberry@ucsd.edu>
To: Matt Price <moptop99@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: getting access to a self-invented option?
Date: Wed, 7 Aug 2019 16:58:41 +0000 [thread overview]
Message-ID: <9EDE113B-CF70-4246-BF76-BAD8248E6EC3@ucsd.edu> (raw)
In-Reply-To: <CAN_Dec-su4XnSBwoS6tB_tgscMc_2qRMncqy+AS_vih73iDBmg@mail.gmail.com>
Matt,
See inline.
> On Aug 7, 2019, at 8:36 AM, Matt Price <moptop99@gmail.com> wrote
>
>
> On Sat, Aug 3, 2019 at 1:42 PM Berry, Charles <ccberry@ucsd.edu> wrote:
> Matt,
>
> This seems like a good use case for a `derived-backend'.
>
> You can use `org-export-define-derived-backend' with 'hugo as the parent, define a :menu-entry to add an export action for your custom export to the hugo menu using '?m' (say) as the key.
>
> Then
>
> C-c C-e H m
>
> will export using your custom variant of hugo.
>
> :-) I'm trying to use the variable to determine whether I export with hugo or with my hugo-reveal franken-backend: https://github.com/titaniumbones/ox-huveal . So my preference is to evaluate the variable BEFORE export begins.
But `org-export-as' doesn't execute until the dispatcher has run and the choice of hugo or hugo-reveal has been made.
However, if this determination is permanently set for a particular file (you only export in one manner according to the variable and never alter the variable), then see below.
>
> I guess another option is to just set a buffer-local variable in the file, or use #+FILETAGS: and hack htings that way. I'm not sure what the most sustainable & org-like method relaly is...
>
The obvious choice for a local file setting is an OPTION. Since your 'huveal backend already has an :options-alist, you can just add another option for `:mwp-export-type' there. If you want access to the value before `org-export-as' runs, try something like
(plist-get (org-export-get-environment) :mwp-export-type)
HTH,
Chuck
next prev parent reply other threads:[~2019-08-07 16:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-02 16:10 getting access to a self-invented option? Matt Price
2019-08-02 20:00 ` Tim Cross
2019-08-07 15:39 ` Matt Price
2019-08-03 5:28 ` Thibault Marin
2019-08-07 15:30 ` Matt Price
2019-08-03 17:42 ` Berry, Charles
2019-08-07 15:36 ` Matt Price
2019-08-07 16:58 ` Berry, Charles [this message]
2019-08-07 17:21 ` Berry, Charles
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=9EDE113B-CF70-4246-BF76-BAD8248E6EC3@ucsd.edu \
--to=ccberry@ucsd.edu \
--cc=emacs-orgmode@gnu.org \
--cc=moptop99@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 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).