From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: Bug in export of call lines Date: Tue, 11 Mar 2014 11:50:18 -1000 Message-ID: References: <87ha768d12.fsf@gmail.com> <87k3c2vts2.fsf@gmail.com> <87txb4n342.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNUZI-0003Ka-GK for emacs-orgmode@gnu.org; Tue, 11 Mar 2014 17:50:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNUZB-0000IS-HE for emacs-orgmode@gnu.org; Tue, 11 Mar 2014 17:50:36 -0400 Received: from qproxy1-pub.mail.unifiedlayer.com ([173.254.64.10]:35348) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1WNUZB-0000IL-4T for emacs-orgmode@gnu.org; Tue, 11 Mar 2014 17:50:29 -0400 In-Reply-To: <87txb4n342.fsf@gmail.com> (Eric Schulte's message of "Tue, 11 Mar 2014 07:23:58 -0600") 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: Eric Schulte Cc: Org-mode , Nicolas Goaziou Hi Eric, Eric Schulte writes: > 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. AFAICT, this variable has no effect on export of calls to R source code blocks, where the source code block is set with :results raw. Also, AFAICT, the behavior of R source code blocks differs from others, including shell. With the default value of org-babel-inline-result-wrap I get this LaTeX export: \section{Export this subtree raw to \LaTeX{}} \label{sec-1} Will shell-2 export 2 with a newline? Will r-2 export 2 with a newline? Will shell-2-raw export 2 with a newline? Will r-2-raw export 2 with a newline? \section{Export this subtree without raw to \LaTeX{}} \label{sec-2} Will shell-2 export \texttt{2} with a newline? Will r-2 export \texttt{2} with a newline? Will shell-2-raw export \texttt{2} with a newline? \begin{verbatim} Will r-2-raw export 2 \end{verbatim} with a newline? % Emacs 24.3.1 (Org mode 8.2.5h) With org-babel-inline-result-wrap set to "%s" I get this: \section{Export this subtree raw to \LaTeX{}} \label{sec-1} Will shell-2 export 2 with a newline? Will r-2 export 2 with a newline? Will shell-2-raw export 2 with a newline? Will r-2-raw export 2 with a newline? \section{Export this subtree without raw to \LaTeX{}} \label{sec-2} Will shell-2 export 2 with a newline? Will r-2 export 2 with a newline? Will shell-2-raw export 2 with a newline? \begin{verbatim} Will r-2-raw export 2 \end{verbatim} with a newline? % Emacs 24.3.1 (Org mode 8.2.5h) Note that there is no change in the LaTeX export of the R calls. I think this is a bug in ob-R.el. From my experiments, it behaves differently than the other babel languages, including shell. For LaTeX export, the workaround is to avoid :results raw with R source code blocks. Although a spurious newline is inserted into the source, this is ignored by LaTeX. All the best, Tom -- Thomas S. Dye http://www.tsdye.com