emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Losing tabs when tangling or editing


From: Michael Hannon
Subject: Re: [O] Losing tabs when tangling or editing
Date: Wed, 30 May 2012 00:19:23 -0700 (PDT)

Bernt Hansen <address@hidden> wrote:

>Michael Hannon <address@hidden> writes:
>
>>
>> I was hoping that there might be some kind of customization possible:
>>
>>     (setq leave-the-bleeping-tabs-alone t)
>
> (setq org-src-preserve-indentation t)
>
> maybe?
>

Woo hoo!  Thanks, Bernt.  This seems to work.  See the appended for a
successful test run.

-- Mike

$ cat hw.org    ######## Org-mode file with additional elisp statement
* test preservation of tabs when tangling

#+BEGIN_SRC emacs-lisp

(setq org-src-preserve-indentation t)

#+END_SRC

#+RESULTS:
: t

#+BEGIN_SRC sh :tangle Makefile.tangled

hw:    hw.cpp
    g++ -o hw hw.cpp

  
#+END_SRC

$ grep -P "\t" Makefile.tangled    ######## found some tabs!
hw:    hw.cpp
    g++ -o hw hw.cpp

$ make -f Makefile.tangled    ######## no complaints from make
g++ -o hw hw.cpp

$ ./hw    ######## the newly-compiled program runs
Hello, world!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]