Hi,

If I understand correctly, the problem is not that you are unable to
execute the code block, but that you are unable to get the results
inserted in the buffer beneath the CALL line.

Naresh Gurbuxani <[email protected]> writes:
> For below code blocks in R and emacs-lisp, C-c C-c sends results to
> *Messages* buffer.  How can I get the results in the org file?
>
> #+name: calc_half
> #+begin_src R :exports code :results silent :var x=0
>   x / 2
> #+end_src
>
> #+CALL: calc_half(x = 5) :exports results :results output
>
> My function call returns call_calc_half(x = 6)

This is as expected since you've used the header ':results silent' in
the code block. If you remove it, executing the CALL line will insert
results in the buffer.

  #+name: calc_half
  #+begin_src R :exports code :var x=0
    x / 2
  #+end_src

  #+CALL: calc_half(x = 5) :exports results :results output

  #+RESULTS:
  : [1] 2.5

  My function call returns call_calc_half(x = 6) {{{results(=3=)}}}

The same goes for the example elisp block.

Does that resolve your problem, or do you have a use case that requires
the block to have :results silent?

In that case, I would have expected to be able to override the ':results
silent' in the src block by adding ':results replace' to the call
lines:

  #+name: calc_half
  #+begin_src R :exports code :var x=0 :results silent
    x / 2
  #+end_src

  #+CALL: calc_half(x = 5) :exports results :results output replace

  My function call returns call_calc_half(x = 6)[:results replace]

However, this doesn't work as I expect, even though the override works
the other way (':results silent' in the call lines will override
':results replace' in the src block).

This may be a bug. (Not sure, Babel execution is complex.)


Regards,
Christian

Reply via email to