emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ross Donaldson <gastove@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode@gnu.org
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: Tue, 05 Apr 2016 15:45:05 -0700	[thread overview]
Message-ID: <m1d1q3ekum.fsf@gmail.com> (raw)
In-Reply-To: <87lh4v12yf.fsf@nicolasgoaziou.fr>

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 | -> | rossdonaldson@RossDonaldson.local.53153 |
| 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 -> rossdonaldson@RossDonaldson.local.53153
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 <gastove@gmail.com> 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

  reply	other threads:[~2016-04-05 22:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-05 22:55 Bug: CALL misbehavior with :results verbatim [8.3.4 (8.3.4-5-gdc68d2-elpaplus @ /Users/rossdonaldson/.emacs.d/elpa/org-plus-contrib-20160229/)] Ross Donaldson
2016-03-16 22:42 ` Nicolas Goaziou
2016-03-16 23:52   ` Ross Donaldson
2016-04-03  9:00     ` Nicolas Goaziou
2016-04-05 22:45       ` Ross Donaldson [this message]
2016-04-06  7:55         ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1d1q3ekum.fsf@gmail.com \
    --to=gastove@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).