1

Using org-babel source blocks, I can name a block and call it later. When I evaluate the block itself, I get a bare value:

#+name: demo
#+BEGIN_SRC python
return 5
#+END_SRC

#+RESULTS: demo
: 5

But if I call the block, the result is always in quotes:

#+call: demo()

#+RESULTS:
: "5"

How on earth do you change this behavior? I've messed with org-babel-inline-results-wrap, to no avail.

  • Using your exact example, I always obtain a simple unquoted 5. Apart from that, be aware that you can put modifiers to the CALL statement (:results, etc.) exactly as you can on the SRC block (look up in the manual): #+CALL: <name>[<inside header arguments>](<arguments>) <end header arguments>. – dfeich Feb 29 '16 at 13:47
  • Yep. I've tried every flag I can provide to the call -- :results verbatim for instance. And, I've never seen an instance in which someone else's call output was quoted. So my conclusion is: it is configurable somehow! But I cannot, for the life of me, figure out how. – Gastove Feb 29 '16 at 22:44
1

This turns out to be a side effect of :results verbatim specifically on call blocks. Vis:

#+name: demo
#+BEGIN_SRC python :results verbatim
return 5
#+END_SRC

#+RESULTS: demo
: 5

#+call: demo() :results value

#+RESULTS:
: 5

#+call: demo() :results verbatim

#+RESULTS:
: "5"

Frankly, I've no idea why this is the case, but at least it's here in case anyone else runs in to it. (I use :results verbatim very commonly on src blocks, so.)

| improve this answer | |
  • 1
    I can reproduce it, now. But it requires for me verbatim on the original src block as well as on the call block. This looks to me like a bug that should be posted to the mailing list. – dfeich Mar 1 '16 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.