emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Losing tabs when tangling or editing
@ 2012-05-23 21:18 Michael Hannon
  2012-05-28 12:30 ` Thomas S. Dye
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Hannon @ 2012-05-23 21:18 UTC (permalink / raw)
  To: Org-Mode List

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-05-30 18:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-23 21:18 Losing tabs when tangling or editing Michael Hannon
2012-05-28 12:30 ` Thomas S. Dye
2012-05-28 21:14   ` Michael Hannon
2012-05-29  3:45     ` Michael Hannon
2012-05-30  1:05     ` Bernt Hansen
2012-05-30  7:19       ` Michael Hannon
2012-05-30 18:53       ` Thomas S. Dye

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).