From: Michael Hannon <jm_hannon@yahoo.com>
To: Bernt Hansen <bernt@norang.ca>
Cc: Org-Mode List <emacs-orgmode@gnu.org>, "Thomas S. Dye" <tsd@tsdye.com>
Subject: Re: Losing tabs when tangling or editing
Date: Wed, 30 May 2012 00:19:23 -0700 (PDT) [thread overview]
Message-ID: <1338362363.35616.YahooMailNeo@web161904.mail.bf1.yahoo.com> (raw)
In-Reply-To: <87mx4qjx6n.fsf@norang.ca>
Bernt Hansen <bernt@norang.ca> wrote:
>Michael Hannon <jm_hannon@yahoo.com> 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!
next prev parent reply other threads:[~2012-05-30 7:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2012-05-30 18:53 ` Thomas S. Dye
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1338362363.35616.YahooMailNeo@web161904.mail.bf1.yahoo.com \
--to=jm_hannon@yahoo.com \
--cc=bernt@norang.ca \
--cc=emacs-orgmode@gnu.org \
--cc=tsd@tsdye.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).