emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: how do you get an OPTIONS value during export?
Date: Wed, 09 Aug 2017 16:55:26 +0200	[thread overview]
Message-ID: <87y3qsaizl.fsf@gmx.us> (raw)
In-Reply-To: CAJ51ETrPkD6ppBwss966f1rKSgCC3L1z8fjhSM34w4TmMKdn4w@mail.gmail.com

Hi John,

John Kitchin <jkitchin@andrew.cmu.edu> writes:

> In my ipynb exporter, I generate md strings for cells using something like
>
> (org-export-string-as
> s
> 'md t '(:with-toc nil :with-tags nil))
>
> This works unless there is a broken link:
>
> https://github.com/jkitchin/ox-ipynb/issues/2#issuecomment-321061051
>
> I figured out I can make it work with :with-broken-links mark, but that
> might overrule what is in an #+OPTIONS line.
>
> So, my question is how do I get the value of what :with-broken-links should
> be that has the right prececedence, i.e. OPTIONS
> org-export-with-broken-links, during the export?

Assuming you have access to the settings, typically called ‘info’ in ox,
it should be easy,

    (plist-get info :with-broken-links)

See ‘org-export-as’ in ox.el for how it’s populated.

For a user-function see ‘org-export-get-environment’.  In an export
backend, it should not be necessary as you should have the info-plist
already.  For usage of ‘org-export-get-environment’ see ox-publish.el.

Hope it helps,
Rasmus

-- 
And when I’m finished thinking, I have to die a lot

  reply	other threads:[~2017-08-09 14:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-08 20:11 how do you get an OPTIONS value during export? John Kitchin
2017-08-09 14:55 ` Rasmus [this message]
2017-08-09 15:03 ` Nick Dokos

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=87y3qsaizl.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --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).