[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Losing tabs when tangling or editing
From: |
Michael Hannon |
Subject: |
[O] Losing tabs when tangling or editing |
Date: |
Wed, 23 May 2012 14:18:39 -0700 (PDT) |
Greetings. I was trying to set up a little demo in which I included a
Makefile inside a "sh" source-code block in an Org-mode file, then tangled the
file and ran "make" on the tangled file (either in the actual shell or in
another sh block in Org).
It appears that Org is removing tabs when it tangles the file, and the lack of
tabs causes "make" to complain.
I've appended a toy example which exhibits the problem. BTW, if I edit the
source block via C-c ' I also lose the tabs, i.e., even before tangling.
Any thoughts about this?
Thanks,
-- Mike
$ cat Makefile.original
hw: hw.cpp
g++ -o hw hw.cpp
$ grep -P "\t" Makefile.original
hw: hw.cpp
g++ -o hw hw.cpp
$ make -f Makefile.original
g++ -o hw hw.cpp
$ ./hw
Hello, world!
$ \rm hw
$ cat hw.org
* test preservation of tabs when tangling
#+BEGIN_SRC sh :tangle Makefile.tangled
hw: hw.cpp
g++ -o hw hw.cpp
#+END_SRC
$ make -f Makefile.tangled
Makefile.tangled:3: *** missing separator (did you mean TAB instead of 8
spaces?). Stop.
- [O] Losing tabs when tangling or editing,
Michael Hannon <=