From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: how do you get an OPTIONS value during export? Date: Wed, 09 Aug 2017 16:55:26 +0200 Message-ID: <87y3qsaizl.fsf@gmx.us> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dfSOo-0001W0-JK for emacs-orgmode@gnu.org; Wed, 09 Aug 2017 10:55:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dfSOk-0001HN-Iz for emacs-orgmode@gnu.org; Wed, 09 Aug 2017 10:55:54 -0400 Received: from [195.159.176.226] (port=42713 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dfSOk-0001H2-Bt for emacs-orgmode@gnu.org; Wed, 09 Aug 2017 10:55:50 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dfSOV-0000Dt-IE for emacs-orgmode@gnu.org; Wed, 09 Aug 2017 16:55:35 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hi John, John Kitchin 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