From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Bug in export of call lines Date: Tue, 11 Mar 2014 07:23:58 -0600 Message-ID: <87txb4n342.fsf@gmail.com> References: <87ha768d12.fsf@gmail.com> <87k3c2vts2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNP1v-0000Gb-D5 for emacs-orgmode@gnu.org; Tue, 11 Mar 2014 11:55:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNP1q-0002mf-PH for emacs-orgmode@gnu.org; Tue, 11 Mar 2014 11:55:47 -0400 Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]:50973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNP1q-0002mZ-D1 for emacs-orgmode@gnu.org; Tue, 11 Mar 2014 11:55:42 -0400 Received: by mail-pa0-f42.google.com with SMTP id fb1so9041315pad.15 for ; Tue, 11 Mar 2014 08:55:40 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Thomas S. Dye" Cc: Nicolas Goaziou , Org-mode , Eric Schulte 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, tsd@tsdye.com (Thomas S. Dye) writes: > Eric Schulte 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