Re: [O] how do you get an OPTIONS value during export?

2017-08-09 Thread Nick Dokos
John Kitchin  writes:

> Hi,
>
> 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?
>

I'm probably being dense, but I don't understand the question. Isn't
the point to overrule what the #+OPTIONS line says (for this particular
string) by adding  '( ... :with-broken links mark) to the list?

-- 
Nick




Re: [O] how do you get an OPTIONS value during export?

2017-08-09 Thread Rasmus
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




[O] how do you get an OPTIONS value during export?

2017-08-08 Thread John Kitchin
Hi,

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?

Thanks,

John

---
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu