From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: CALL misbehavior with :results verbatim [8.3.4 (8.3.4-5-gdc68d2-elpaplus @ /Users/rossdonaldson/.emacs.d/elpa/org-plus-contrib-20160229/)] Date: Wed, 06 Apr 2016 09:55:48 +0200 Message-ID: <877fgbf9x7.fsf@nicolasgoaziou.fr> References: <874mc6vyby.fsf@nicolasgoaziou.fr> <87h9g6gevo.fsf@gmail.com> <87lh4v12yf.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aniHZ-0001Hl-B5 for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 03:53:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aniHU-0004rr-BM for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 03:53:45 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:45482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aniHU-0004rh-4B for emacs-orgmode@gnu.org; Wed, 06 Apr 2016 03:53:40 -0400 In-Reply-To: (Ross Donaldson's message of "Tue, 05 Apr 2016 15:45:05 -0700") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Ross Donaldson Cc: emacs-orgmode@gnu.org Hello, Ross Donaldson writes: > So: by default (at least, for me, in my configuration), Org > automatically tries to interpret the results of src blocks as Org > values -- usually tables. For example, evaluating `ls -la` in a shell > src block returns, by default, Org's best attempt to parse a table > from the output of ls. > > `:results verbatim` skips this, inserting the values as an example block.= Vis: [...] Indeed, as I understand it, verbatim is a way to force "dumb" default handling for results. However, I don't find the manual particularly clear about it, particularly in the second sentence: =E2=80=A2 =E2=80=98scalar=E2=80=99, =E2=80=98verbatim=E2=80=99 The resul= ts should be interpreted literally=E2=80=94they will not be converted into a table. The results will be inserted into the Org mode buffer as quoted text. E.g., =E2=80=98:results value verbatim=E2=80=99. > So. With call, I get values wrapped in quotes, often with a newline, > if I use `verbatim`. The core of the problem is that Babel emacs-lisp has its own interpretation for "verbatim", more in line with the second sentence pointed out above. Hence, in `org-babel-execute:emacs-lisp', one can see (if (or (member "scalar" (cdr (assoc :result-params params))) (member "verbatim" (cdr (assoc :result-params params)))) (format "%S" result) (format "%s" result)) So, basically, the function quote strings; "verbatim" is no longer equivalent to default behaviour. Eventually, as icing of the cake, every CALL line is evaluated as an emacs-lisp block, so the idiosyncrasy above propagates to any result coming from any language. I think it is no good if any language provides its own definition for verbatim. We should stick to a common one. Besides, I don't think CALL lines should be wrapped within an Emacs lisp call. Regards, --=20 Nicolas Goaziou