Hello,

Ross Donaldson <gast...@gmail.com> 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:

   • ‘scalar’, ‘verbatim’ The results should be interpreted
     literally—they will not be converted into a table.  The results
     will be inserted into the Org mode buffer as quoted text.  E.g.,
     ‘:results value verbatim’.

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

-- 
Nicolas Goaziou

Reply via email to