From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: tabs inserted in code blocks Date: Wed, 12 Mar 2014 00:21:14 -0400 Message-ID: <87k3c02gjp.fsf@gmail.com> References: <874n34xybg.fsf@mezarim.home> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNaff-0000XC-5a for emacs-orgmode@gnu.org; Wed, 12 Mar 2014 00:21:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNafZ-00040W-6k for emacs-orgmode@gnu.org; Wed, 12 Mar 2014 00:21:35 -0400 Received: from plane.gmane.org ([80.91.229.3]:35386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNafZ-00040S-0B for emacs-orgmode@gnu.org; Wed, 12 Mar 2014 00:21:29 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WNafX-0000L9-2l for emacs-orgmode@gnu.org; Wed, 12 Mar 2014 05:21:27 +0100 Received: from pool-98-110-160-12.bstnma.fios.verizon.net ([98.110.160.12]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Mar 2014 05:21:27 +0100 Received: from ndokos by pool-98-110-160-12.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Mar 2014 05:21:27 +0100 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: emacs-orgmode@gnu.org "Stephen J. Barr" writes: > Hello, > > I have the following code block in an org-mode file: > > -------------------------------------------------------------------------------- > > #+CAPTION: Matlab Dynamic Programming Solution > #+LABEL: code:matlab-outer-loop-reference > #+BEGIN_SRC octave > Normal_BuildT = realmax * ones(T, i_max, j_max); > for i=(1:i_max) > for j=(1:j_max) > Normal_BuildT(T,i,j) = compute_cell_final(i,j); > end > end > > for t=((T-1):-1:1) > for i=(1:i_max) > for j=(1:j_max) > Normal_BuildT(t,i,j) = compute_cell(t,i,j, Normal_BuildT(t+1,:,:)); > end > end > end > #+END_SRC > > -------------------------------------------------------------------------------- > > I am exporting this to LaTeX, which gives me the following code. > See that there are tab characters inserted before the lines with Normal_BuildT. > This is causing minted to render with these strange ^^I characters. > > -------------------------------------------------------------------------------- > > \begin{listing}[H] > \begin{minted}[]{octave} > Normal_BuildT = realmax * ones(T, i_max, j_max); > for i=(1:i_max) > for j=(1:j_max) > Normal_BuildT(T,i,j) = compute_cell_final(i,j); > end > end > > for t=((T-1):-1:1) > for i=(1:i_max) > for j=(1:j_max) > Normal_BuildT(t,i,j) = compute_cell(t,i,j, Normal_BuildT(t+1,:,:)); > end > end > end > \end{minted} > \caption{\label{code:matlab-outer-loop-reference}Matlab Dynamic Programming Solution} > \end{listing} > > -------------------------------------------------------------------------------- > > How do I disable this behavior? > Untested and not sure it'll work: (setq indent-tabs-mode nil) or perhaps (setq-default indent-tabs-mode nil) - in the latter case, you might have to turn it on in specific modes. You will also have to restart emacs. -- Nick