From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Org not preserving Python indent levels on LaTex export due to tabs Date: Sun, 2 Feb 2014 12:05:14 -0600 Message-ID: References: <874n4iq7hk.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WA1cP-0006Ii-TL for emacs-orgmode@gnu.org; Sun, 02 Feb 2014 13:18:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WA1Pv-0007jy-1z for emacs-orgmode@gnu.org; Sun, 02 Feb 2014 13:06:25 -0500 Received: from mail-oa0-x234.google.com ([2607:f8b0:4003:c02::234]:47998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WA1Pu-0007jQ-S7 for emacs-orgmode@gnu.org; Sun, 02 Feb 2014 13:05:14 -0500 Received: by mail-oa0-f52.google.com with SMTP id i4so7222497oah.39 for ; Sun, 02 Feb 2014 10:05:14 -0800 (PST) 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: James Ryland Miller Cc: emacs-orgmode , Nicolas Goaziou I think it was very recently added (i.e. yesterday) due to this thread about a very similar (same) issue: - http://www.mail-archive.com/emacs-orgmode@gnu.org/msg81203.html I'd love to update Worg/documentation to include it... out of curiosity, where were you looking for it to be documented? That way, I can add it to the most intuitive/popular location. Thanks, John On Sun, Feb 2, 2014 at 11:32 AM, James Ryland Miller wrote: > Thank you! That worked perfectly. Is '-i' not in the docs? > > On Sun, Feb 2, 2014 at 1:49 AM, Nicolas Goaziou wrote: >> Hello, >> >> James Ryland Miller writes: >> >>> I'm having trouble with getting python source=code blocks to export to >>> LaTeX properly. I've figured out what's going wrong: the exporter is >>> inserting tab characters on lines with 2 or more indentation levels in >>> python. If I use org to export to .tex first, and then untabify the >>> .tex files, the indent levels are preserved (assuming the tabs >>> correctly lined up with the corresponding python in the first place, >>> which many times they don't). >> >> Try to set `org-src-preserve-indentation' to a non-nil value (on a very >> recent Org) or add a "-i" flag to you source block: >> >> #+BEGIN_SRC python -n -i >> ... >> #+END_SRC >> >> This should prevent Org from touching indentation within the block. >> >> >> Regards, >> >> -- >> Nicolas Goaziou >