From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Preservation of white space in babel blocks, exporting to PDF Date: Sun, 2 Feb 2014 09:59:05 -0600 Message-ID: References: <87eh3od13z.fsf@gmail.com> <87y51vhjq6.fsf@gmail.com> <87ppn7hhwt.fsf@gmail.com> <87lhxv7mym.fsf@med.uni-goettingen.de> <87a9ebs0dn.fsf@gmail.com> <87ob2qr32x.fsf@gmail.com> <87vbwxq4wu.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WA09s-0005d9-4U for emacs-orgmode@gnu.org; Sun, 02 Feb 2014 11:44:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9zRq-0003Yg-D4 for emacs-orgmode@gnu.org; Sun, 02 Feb 2014 11:00:26 -0500 Received: from mail-oa0-x22a.google.com ([2607:f8b0:4003:c02::22a]:44567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9zRq-0003Yc-6p for emacs-orgmode@gnu.org; Sun, 02 Feb 2014 10:59:06 -0500 Received: by mail-oa0-f42.google.com with SMTP id i7so7289111oag.29 for ; Sun, 02 Feb 2014 07:59:05 -0800 (PST) In-Reply-To: <87vbwxq4wu.fsf@gmail.com> 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: Nicolas Goaziou Cc: Andreas Leha , emacs-orgmode On Sun, Feb 2, 2014 at 2:45 AM, Nicolas Goaziou wrote: > Hello, > > John Hendy writes: > >> Thus, I take it that the default org setting is non-nil? > > Actually this is an Emacs variable, and it is indeed non-nil. Gotcha. So if it interferes with org-src-preserve-indentation, that's good to know. I'm assuming that was the change you recently pushed per the last note. > >> I am a bit frustrated by trying to be as clear as I could about the >> situation with reproducible examples, and then finding out the behavior was >> apparently obvious, but due to a variable I didn't know existed... > > The behaviour is not obvious. Sorry, what I meant is that at no point in our dialog did you seem surprised by my outcomes. First, you simply said you couldn't reproduce. Then you said the issue was because I was /using/ tabs (vs. spaces). When I disagreed, you clarified that saying I was /using/ tabs had really meant I had indent-tabs-mode set to non-nil. From my non-mastery of Org/emacs perspective, it appeared you knew what was going on, but revealed it in layers to me. >> I'll try a fresh pull tomorrow as well as looking at indent-tabs-mode. > > This should hopefully work. It should also work if you don't change this > variable but set `org-src-preserve-indentation' to a non-nil value, > since I fixed that. > > Note that you can set this variable on a per-block basis with "-i" flag: > > #+BEGIN_SRC python -i > ... > #+END_SRC > Awesome. Tried both methods, both of which work exactly as I'd have hoped! - Putting =(setq org-src-preserve-indentation t)= in .emacs - No setting for the above variable, but using =-i= in the src block Thanks so much! This has perplexed me for a really long time, but I've never looked into it. I'm giving my first more "major" talk at a local event (talking about R + geo-spatial data as well as Shiny interactive web-apps), and wanted my code to look nice and pretty. Many thanks for enabling that!! I'll be on the lookout for somewhere on Worg where I can add the new documentation if you haven't done so already. Best regards, John > > Regards, > > -- > Nicolas Goaziou