[Top][All Lists]

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

Re: [O] two sets of default header arguments for one language

From: Charles C. Berry
Subject: Re: [O] two sets of default header arguments for one language
Date: Thu, 10 Sep 2015 15:28:33 -0700
User-agent: Alpine 2.20 (OSX 67 2015-01-07)

On Thu, 10 Sep 2015, Alan Schmitt wrote:


I’m writing some lab exercises where I have a fairly long list of header
arguments for each source block. I know I can use language-specific
default arguments, but I need to switch between questions (short list):

#+begin_src ocaml :tangle tp1.ml

and answers

#+begin_src ocaml :exports results :results verbatim drawer :post 
wrap-myres(text=*this*) :tangle tp1_ans.ml

Is there a way to have two sets of default arguments for a given
language, or can I declare a new language just for the sake of different

I'd use two new `languages'.

For most uses, I think you can get away with as little as this:

(defalias 'org-babel-execute:ocaml-a 'org-babel-execute:ocaml)
(defalias 'org-babel-execute:ocaml-q 'org-babel-execute:ocaml)

(defvar org-babel-default-header-args:ocaml-a
        '((:exports . "results") [fill in the rest] ))
(defvar org-babel-default-header-args:ocaml-q
        '((:tangle . "tp1.ml")))

and have acceptable behavior without stepping on the original language.

Untested, of course.



reply via email to

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