emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: "Charles C. Berry" <ccberry@ucsd.edu>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: two sets of default header arguments for one language
Date: Fri, 11 Sep 2015 11:36:17 +0200	[thread overview]
Message-ID: <m2r3m52t7y.fsf@charm-ecran.irisa.fr> (raw)
In-Reply-To: <alpine.OSX.2.20.1509101533070.955@charles-berrys-macbook.local> (Charles C. Berry's message of "Thu, 10 Sep 2015 15:39:19 -0700")

[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]

On 2015-09-11 00:39, "Charles C. Berry" <ccberry@ucsd.edu> writes:

>>> 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
>>> arguments?
>>>
>>
>> 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.
>
>
> You also want to customize `org-src-lang-modes' to be able to edit the src
> code natively.

Very nice! I’ll give it a try. Thanks a lot,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Last week athmospheric CO₂ average (Updated September 9, 2015, Mauna Loa Obs.):
377.86 ppm

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

  reply	other threads:[~2015-09-11  9:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-10 13:54 two sets of default header arguments for one language Alan Schmitt
2015-09-10 21:00 ` Thomas S. Dye
2015-09-11  9:30   ` Alan Schmitt
2015-09-10 21:16 ` Rainer M Krug
2015-09-10 21:25   ` Nicolas Goaziou
2015-09-11  7:09     ` Rainer M Krug
2015-09-11  9:33       ` Alan Schmitt
2015-09-11 16:27       ` Nicolas Goaziou
2015-09-18 10:17         ` Rainer M Krug
2015-09-10 22:28 ` Charles C. Berry
2015-09-10 22:39   ` Charles C. Berry
2015-09-11  9:36     ` Alan Schmitt [this message]
2015-09-14 14:39       ` Alan Schmitt

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=m2r3m52t7y.fsf@charm-ecran.irisa.fr \
    --to=alan.schmitt@polytechnique.org \
    --cc=ccberry@ucsd.edu \
    --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).