From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: R source code, break long lines Date: Tue, 13 May 2014 11:16:04 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkFN9-0006Jg-W8 for emacs-orgmode@gnu.org; Tue, 13 May 2014 12:16:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkFN8-0004ht-6M for emacs-orgmode@gnu.org; Tue, 13 May 2014 12:16:07 -0400 Received: from mail-ob0-x230.google.com ([2607:f8b0:4003:c01::230]:54674) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkFN8-0004hg-1Z for emacs-orgmode@gnu.org; Tue, 13 May 2014 12:16:06 -0400 Received: by mail-ob0-f176.google.com with SMTP id wo20so652041obc.35 for ; Tue, 13 May 2014 09:16:05 -0700 (PDT) In-Reply-To: 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: Johannes Rainer Cc: emacs-orgmode On Tue, May 13, 2014 at 1:04 AM, Johannes Rainer 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