From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [Babel] Preserving tabs in code blocks Date: Fri, 26 Aug 2011 00:11:58 -0400 Message-ID: <5393.1314331918@alphaville.dokosmarshall.org> References: <87mxex2cwe.fsf@norang.ca> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:49936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qwnm6-0005iE-Hf for emacs-orgmode@gnu.org; Fri, 26 Aug 2011 00:12:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qwnm5-0001ZW-Du for emacs-orgmode@gnu.org; Fri, 26 Aug 2011 00:12:10 -0400 Received: from g1t0026.austin.hp.com ([15.216.28.33]:14336) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qwnm5-0001ZJ-7q for emacs-orgmode@gnu.org; Fri, 26 Aug 2011 00:12:09 -0400 In-Reply-To: Message from Bernt Hansen of "Thu, 25 Aug 2011 21:13:21 EDT." <87mxex2cwe.fsf@norang.ca> 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: Bernt Hansen Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Bernt Hansen wrote: > Hi all, > > I want to include the contents of a file which requires TABS between > fields in a #+begin_src ... #+end_src block. > > When I use C-c ' to edit the block the TABS are all converted back to > spaces. I want to be able to tangle the file and preserve the TABS > which are required as input to some tool chain. > > Is there some mode I can use to preserve the TABS? > > For example: > > #+begin_src fundamental :tangle testtabs.txt > These words > are separated > by tabs. > #+end_src > > I need to be able to create the testtabs.txt file with the TAB > characters intact otherwise it fails as input to the tool chain (which I > have no control over). > > Is there any way to do this? > > For now I'm keeping the input in a separate file, but I would much > prefer to have it in a babel source block in my notes for future > reference. > Try setting org-src-preserve-indentation to t. If you change the default value of indent-tabs-mode to nil (as I do), then you might have problems in any case: inserted tabs will be changed to spaces. But if you have it left at the default t, then I think this works. Nick