emacs-orgmode
[Top][All Lists]
Advanced

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

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


From: Eric Schulte
Subject: Re: [Orgmode] Re: [Babel] Reporting 2 problems of code execution
Date: Thu, 02 Dec 2010 12:40:42 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Sébastien Vauban <address@hidden> writes:

> 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:

He Seb,

Sorry I miss-typed, I meant the following which is exactly your
suggestion below.

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

> 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 " "
>

That seems like a good suggestion, the only question seems to be what is
the most natural syntax.

I think I would lean more towards something like

#+SQL_SOURCE:

Best -- Eric

>
> Best regards,
>   Seb



reply via email to

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