Sébastien Vauban <wxhgmqzgw...@spammotel.com> writes:

> Hi Eric,
>
> "Eric Schulte" wrote:
>> Sébastien Vauban <wxhgmqzgw...@spammotel.com> 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

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to