[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] switch parsing in babel

From: John Kitchin
Subject: Re: [O] switch parsing in babel
Date: Mon, 28 Mar 2016 08:36:22 -0400
User-agent: mu4e 0.9.16; emacs

Nicolas Goaziou writes:

> Hello,
> John Kitchin <address@hidden> writes:
>> I am trying to make a new source block that looks like this:
>> #+BEGIN_SRC obabel -icml -osmi
>> [CH4]
>> #+END_SRC
>> This gets parsed to:
>> (src-block
>>  (:language "obabel" :switches "-i" :parameters "cml -osmi" :begin
>> 190 :end 240 :number-lines nil :preserve-indent t :retain-labels
>> t :use-labels t :label-fmt nil :hiddenp nil :value "[CH4]
>> \n" :post-blank 1 :post-affiliated 190 :parent nil))
>> Is that correct? I would have thought that
>> 1. The first switch should be -icml
>> 2. -osmi would also be a switch.
> This is incorrect, but not in the way you think.
> There is no concatenation for switches in Org syntax, so it should be
> parsed as
>   :switches nil :parameters -icml -osmi
> which looks wrong anyway.
> Maybe you're simply mis-using switches here, which are reserved to Org?

It could be. I get it now, I was looking at

#+NAME: <name>
#+BEGIN_SRC <language> <switches> <header arguments>

and I just noticed that "<switches> can be used to control export of the
code block" which isn't what I was trying to do with it.

> Regards,

Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213

reply via email to

[Prev in Thread] Current Thread [Next in Thread]