emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: tsd@tsdye.com (Thomas S. Dye)
To: Eric Schulte <schulte.eric@gmail.com>
Cc: Org-mode <emacs-orgmode@gnu.org>, Nicolas Goaziou <n.goaziou@gmail.com>
Subject: Re: Bug in export of call lines
Date: Tue, 11 Mar 2014 11:50:18 -1000	[thread overview]
Message-ID: <m261nkz9ph.fsf@tsdye.com> (raw)
In-Reply-To: <87txb4n342.fsf@gmail.com> (Eric Schulte's message of "Tue, 11 Mar 2014 07:23:58 -0600")

Hi Eric,

Eric Schulte <schulte.eric@gmail.com> 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

  reply	other threads:[~2014-03-11 21:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-07  2:05 Bug in export of call lines Thomas S. Dye
2014-03-10 12:16 ` Nicolas Goaziou
2014-03-10 17:14   ` Thomas S. Dye
2014-03-10 17:38     ` Eric Schulte
2014-03-11  2:45       ` Thomas S. Dye
2014-03-11 13:23         ` Eric Schulte
2014-03-11 21:50           ` Thomas S. Dye [this message]
2014-03-12  1:40             ` Eric Schulte
2014-03-12  6:00               ` Thomas S. Dye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m261nkz9ph.fsf@tsdye.com \
    --to=tsd@tsdye.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    --cc=schulte.eric@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).