[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] R source code, break long lines

From: Johannes Rainer
Subject: Re: [O] R source code, break long lines
Date: Tue, 13 May 2014 21:26:21 +0200

On Tue, May 13, 2014 at 6:16 PM, John Hendy <address@hidden> wrote:
On Tue, May 13, 2014 at 1:04 AM, Johannes Rainer
<address@hidden> wrote:
> dear all,
> I'm extensively using org-mode in combination with R source code blocks. The
> only thing I miss is the possibility to break long lines of R code in the
> exported pdf.
> Is there a way to tell org, or the latex exporter, to have automatic line
> breaks for long lines?

I think these are treated as verbatim... so what's in your buffer is
what you'll get in PDF. You might consider editing the block with C-c
' (Ctrl + C, then single quote). From there, when you hit a reasonable
point (<=80 characters), press return and Org will auto-indent things
pretty nicely, at least in my experience with R.

right, that's the way I'm doing it now. just thought I missed some "automatic" way to do that.

If you get odd results, perhaps check this thread, as I was having
issues with Org exporting the code blocks exactly as I'd typed them:
- https://www.mail-archive.com/address@hidden/msg81100.html

Tl;dr is that you should check the variables
org-src-preserve-indentation, and possibly the variable

so far, ess/org or however formatted the code nicely for me after pressing return in the ess mode buffer

Best regards,

> thanks in advance!
> cheers, jo

reply via email to

[Prev in Thread] Current Thread [Next in Thread]