Hi Tom,

This actually is also an issue with shell code blocks.  The fix is to
customize the org-babel-inline-result-wrap variable (e.g., as follows)
instead of setting the result type to RAW.

  (setq org-babel-inline-result-wrap "%s")

Perhaps a note about this variable should be added to the description of
inline code blocks (both call and src_*) in the manual.

Best,

t...@tsdye.com (Thomas S. Dye) writes:

> Eric Schulte <schulte.e...@gmail.com> writes:
>
>> Somehow this doesn't seem to be a problem with other languages, so I
>> believe the necessary fix may be R specific.
>
> Following is a small test that appears to indicate that the bug is R
> specific and only bites when the source code block has :results raw.
>
>   #+DATE: \today
>   #+LATEX_CLASS: article
>   #+LATEX_CLASS_OPTIONS:
>   #+LATEX_HEADER:
>   #+LATEX_HEADER_EXTRA:
>
>
>   * Export this subtree to LaTeX
>     :PROPERTIES:
>     :results:  raw
>     :END:
>
>   Will lisp-2 export call_lisp-2() with a newline?
>
>   Will python-2 export call_python-2() with a newline?
>
>   Will r-2 export call_r-2() with a newline?
>
>   Will lisp-2-raw export call_lisp-2-raw() with a newline?
>
>   Will python-2-raw export call_python-2-raw() with a newline?
>
>   Will r-2-raw export call_r-2-raw() with a newline?
>
>   * Similar code in three languages
>
>   #+name: lisp-2
>   #+begin_src lisp
>   (+ 1 1)
>   #+end_src
>
>   #+name: python-2
>   #+begin_src python
>   return(1 + 1)
>   #+end_src
>
>   #+name: r-2
>   #+begin_src R
>   1 + 1
>   #+end_src
>
>   #+name: lisp-2-raw
>   #+begin_src lisp :results raw
>   (+ 1 1)
>   #+end_src
>
>   #+name: python-2-raw
>   #+begin_src python :results raw
>   return(1 + 1)
>   #+end_src
>
>   #+name: r-2-raw
>   #+begin_src R :results raw
>   1 + 1
>   #+end_src
>
> Here is the relevant portion of the LaTeX export:
>
>   Will lisp-2 export 2 with a newline?
>
>   Will python-2 export 2 with a newline?
>
>   Will r-2 export 2 with a newline?
>
>   Will lisp-2-raw export 2 with a newline?
>
>   Will python-2-raw export 2 with a newline?
>
>   Will r-2-raw export 2
>    with a newline?
>   % Emacs 24.3.1 (Org mode 8.2.5h)
>
> All the best,
> Tom

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D

Reply via email to