From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Re: [Babel] Reporting 2 problems of code execution Date: Thu, 02 Dec 2010 12:40:42 -0700 Message-ID: <878w087ykl.fsf@gmail.com> References: <80wrnxi59j.fsf@missioncriticalit.com> <80pqtoijrw.fsf@missioncriticalit.com> <877hftdx5b.fsf@gmail.com> <80y6888ql1.fsf@missioncriticalit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=33740 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POF1R-0004oo-UA for emacs-orgmode@gnu.org; Thu, 02 Dec 2010 14:40:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POF1O-0006vv-NC for emacs-orgmode@gnu.org; Thu, 02 Dec 2010 14:40:53 -0500 Received: from mail-pv0-f169.google.com ([74.125.83.169]:57094) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POF1O-0006vd-HO for emacs-orgmode@gnu.org; Thu, 02 Dec 2010 14:40:50 -0500 Received: by pvc30 with SMTP id 30so3696937pvc.0 for ; Thu, 02 Dec 2010 11:40:49 -0800 (PST) In-Reply-To: <80y6888ql1.fsf@missioncriticalit.com> (=?utf-8?Q?=22S=C3=A9b?= =?utf-8?Q?astien?= Vauban"'s message of "Thu, 02 Dec 2010 10:35:38 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?utf-8?Q?S=C3=A9bastien?= Vauban Cc: emacs-orgmode@gnu.org S=C3=A9bastien Vauban writes: > Hi Eric, > > "Eric Schulte" wrote: >> S=C3=A9bastien Vauban 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 ma= ny 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 langu= age > 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 whi= ch 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