From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: Org not preserving Python indent levels on LaTex export due to tabs Date: Mon, 03 Feb 2014 14:08:42 +0100 Message-ID: <86bnyouyw5.fsf@somewhere.org> References: <874n4iq7hk.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Nicolas Goaziou wrote: > 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. Again (as for `org-src-fontify-natively'), shouldn't this be true by default? Best regards, Seb -- Sebastien Vauban