emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: [Babel] Reporting 2 problems of code execution


From: Sébastien Vauban
Subject: [Orgmode] Re: [Babel] Reporting 2 problems of code execution
Date: Thu, 02 Dec 2010 10:35:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)

Hi Eric,

"Eric Schulte" wrote:
> Sébastien Vauban <address@hidden> writes:
>> You're right that could be it. I often forget about adding that setting, even
>> though it's more or less mandatory for the sh blocks -- at least, in many sh
>> blocks I write...
>
> You can specify this as the default header argument for all shell blocks
> with the following.
>
> #+begin_src emacs-lisp
>   (add-to-list 'org-babel-default-header-args '((:results . "output")))
> #+end_src

Thanks for the tip but... that may be a bit drastic, I mean forcing every
snippet of *every language* to behave like that: I'm convinced it's the most
natural choice for sh blocks, but maybe the less natural (i.e., must be
overridden) for all other programming languages.

In fact, I have the strong impression that we should need this on a language
basis, something like:

#+begin_src emacs-lisp
  (add-to-list 'org-babel-default-header-args '(
               (sh . (:results . "output"))
               (emacs-lisp . (:results . "value"))))
#+end_src

I feel the same about the Babel "file" property:

#+BABEL: :engine mysql :cmdline -S server -U sa -P secret -d storeall -n -w 700 
-s " "

Not being able to specify the language these defaults apply to may rapidly
lead to clashes... Or we have to set the default for the language for which we
have the biggest number of chunks, and explicitly set the values for all the
other snippets that are written in other languages.

Maybe allowing such a specification line?

#+BABEL sql: :engine mysql :cmdline -S server -U sa -P secret -d storeall -n -w 
700 -s " "

Best regards,
  Seb

-- 
Sébastien Vauban




reply via email to

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