[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Bug: CALL misbehavior with :results verbatim [8.3.4 (8.3.4-5-gdc
From: |
Ross Donaldson |
Subject: |
Re: [O] 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: |
Tue, 05 Apr 2016 15:45:05 -0700 |
Nicolas --
Oh! Apologies: didn't mean to be short or unhelpful. I misunderstood you -- my
bad!
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:
#+BEGIN_SRC sh
ls -la | head
#+END_SRC
#+RESULTS:
| total | 360 | | | | | | |
| | |
| drwxr-xr-x@ | 17 | rossdonaldson | staff | 578 | Apr | 5 | 15:42 | .
| | |
| lrwxr-xr-x | 1 | rossdonaldson | staff | 39 | Apr | 5 | 15:42 |
.#cotidienne.org | -> | address@hidden |
| drwx------@ | 62 | rossdonaldson | staff | 2108 | Mar | 31 | 19:37 | ..
| | |
| -rw-r--r--@ | 1 | rossdonaldson | staff | 5688 | Mar | 8 | 23:07 |
Rplots.pdf | | |
| drwxr-xr-x@ | 3 | rossdonaldson | staff | 102 | Mar | 8 | 23:06 | auto
| | |
| -rw-r--r--@ | 1 | rossdonaldson | staff | 39 | May | 12 | 2015 |
bookmarks.org | | |
| -rw-r--r--@ | 1 | rossdonaldson | staff | 31 | Feb | 25 | 09:32 |
cotidienne.md | | |
| -rw-r--r--@ | 1 | rossdonaldson | staff | 34538 | Apr | 5 | 15:33 |
cotidienne.org | | |
#+BEGIN_SRC sh :results verbatim
ls -la | head
#+END_SRC
#+RESULTS:
#+begin_example
total 360
drwxr-xr-x@ 17 rossdonaldson staff 578 Apr 5 15:42 .
lrwxr-xr-x 1 rossdonaldson staff 39 Apr 5 15:42 .#cotidienne.org ->
address@hidden
drwx------@ 62 rossdonaldson staff 2108 Mar 31 19:37 ..
-rw-r--r--@ 1 rossdonaldson staff 5688 Mar 8 23:07 Rplots.pdf
drwxr-xr-x@ 3 rossdonaldson staff 102 Mar 8 23:06 auto
-rw-r--r--@ 1 rossdonaldson staff 39 May 12 2015 bookmarks.org
-rw-r--r--@ 1 rossdonaldson staff 31 Feb 25 09:32 cotidienne.md
-rw-r--r--@ 1 rossdonaldson staff 34538 Apr 5 15:33 cotidienne.org
#+end_example
So. With call, I get values wrapped in quotes, often with a newline, if I use
`verbatim`.
Nicolas Goaziou writes:
> Hello,
>
> Ross Donaldson <address@hidden> writes:
>
>> Nicolas --
>>
>>> Isn't it the point of the "verbatim" parameter?
>>
>> I didn't think so, no. Certainly, it doesn't behave this way in any other
>> context, nor does the documentation make me think it should.
>>
>>> What did you expect instead?
>>
>> I expect the results of a call block to be the same as from evaluating the
>> named src block directly. Why would I expect anything else?
>
> I don't know. I am not sure about the meaning of "verbatim". I was
> hoping for an explanation.
>
> Anyway, I investigated a bit. see
> <http://permalink.gmane.org/gmane.emacs.orgmode/106015> for some more
> information.
>
>
> Regards,
--
Cheers,
Ross