* R source code, break long lines
@ 2014-05-13 6:04 Johannes Rainer
2014-05-13 16:16 ` John Hendy
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Rainer @ 2014-05-13 6:04 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
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?
thanks in advance!
cheers, jo
[-- Attachment #2: Type: text/html, Size: 402 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: R source code, break long lines
2014-05-13 6:04 Johannes Rainer
@ 2014-05-13 16:16 ` John Hendy
0 siblings, 0 replies; 3+ messages in thread
From: John Hendy @ 2014-05-13 16:16 UTC (permalink / raw)
To: Johannes Rainer; +Cc: emacs-orgmode
On Tue, May 13, 2014 at 1:04 AM, Johannes Rainer
<johannes.rainer@gmail.com> 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.
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/emacs-orgmode@gnu.org/msg81100.html
Tl;dr is that you should check the variables
org-src-preserve-indentation, and possibly the variable
indent-tabs-mode.
Best regards,
John
> thanks in advance!
>
> cheers, jo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: R source code, break long lines
@ 2014-05-13 19:26 Johannes Rainer
0 siblings, 0 replies; 3+ messages in thread
From: Johannes Rainer @ 2014-05-13 19:26 UTC (permalink / raw)
To: John Hendy; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1438 bytes --]
On Tue, May 13, 2014 at 6:16 PM, John Hendy <jw.hendy@gmail.com> wrote:
> On Tue, May 13, 2014 at 1:04 AM, Johannes Rainer
> <johannes.rainer@gmail.com> 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.
thanks!
> 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/emacs-orgmode@gnu.org/msg81100.html
>
> Tl;dr is that you should check the variables
> org-src-preserve-indentation, and possibly the variable
> indent-tabs-mode.
>
>
> so far, ess/org or however formatted the code nicely for me after pressing
return in the ess mode buffer
> Best regards,
> John
>
> > thanks in advance!
> >
> > cheers, jo
>
[-- Attachment #2: Type: text/html, Size: 2430 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-13 19:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-13 19:26 R source code, break long lines Johannes Rainer
-- strict thread matches above, loose matches on Subject: below --
2014-05-13 6:04 Johannes Rainer
2014-05-13 16:16 ` John Hendy
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.