* Preserve tabs in tangled babel output
@ 2015-03-11 13:49 Roger Mason
2015-03-11 14:56 ` Charles C. Berry
0 siblings, 1 reply; 6+ messages in thread
From: Roger Mason @ 2015-03-11 13:49 UTC (permalink / raw)
To: emacs-orgmode
Hello,
This code:
#+BEGIN_SRC makefile :tangle Makefile
hello: hello.f90
gfortran hello.f90
execute: hello
./a.out
clean:
rm -f a.out *.o
#+END_SRC
(stolen from John Kitchin) produces a Makefile with spaces instead of
tabs. I created the content in makefile mode, with tabs, but emacs
untabifies the output. How can I prevent this?
Thanks,
Roger
Org-mode 8.2.6
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Preserve tabs in tangled babel output
2015-03-11 13:49 Preserve tabs in tangled babel output Roger Mason
@ 2015-03-11 14:56 ` Charles C. Berry
2015-03-11 15:09 ` John Kitchin
0 siblings, 1 reply; 6+ messages in thread
From: Charles C. Berry @ 2015-03-11 14:56 UTC (permalink / raw)
To: Roger Mason; +Cc: emacs-orgmode
On Wed, 11 Mar 2015, Roger Mason wrote:
> Hello,
>
> This code:
>
> #+BEGIN_SRC makefile :tangle Makefile
> hello: hello.f90
> gfortran hello.f90
>
> execute: hello
> ./a.out
>
> clean:
> rm -f a.out *.o
> #+END_SRC
>
> (stolen from John Kitchin) produces a Makefile with spaces instead of
> tabs. I created the content in makefile mode, with tabs, but emacs
> untabifies the output. How can I prevent this?
Use the `-i' results switch:
#+BEGIN_SRC makefile -i :tangle Makefile
or set `org-src-preserve-indentation' non-nil.
HTH,
Chuck
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Preserve tabs in tangled babel output
2015-03-11 14:56 ` Charles C. Berry
@ 2015-03-11 15:09 ` John Kitchin
2015-03-11 15:28 ` Charles C. Berry
2015-03-11 16:05 ` Roger Mason
0 siblings, 2 replies; 6+ messages in thread
From: John Kitchin @ 2015-03-11 15:09 UTC (permalink / raw)
To: Charles C. Berry; +Cc: Roger Mason, emacs-orgmode
I have org-src-preserve-indentation set to t.
Charles C. Berry writes:
> On Wed, 11 Mar 2015, Roger Mason wrote:
>
>> Hello,
>>
>> This code:
>>
>> #+BEGIN_SRC makefile :tangle Makefile
>> hello: hello.f90
>> gfortran hello.f90
>>
>> execute: hello
>> ./a.out
>>
>> clean:
>> rm -f a.out *.o
>> #+END_SRC
>>
>> (stolen from John Kitchin) produces a Makefile with spaces instead of
>> tabs. I created the content in makefile mode, with tabs, but emacs
>> untabifies the output. How can I prevent this?
>
> Use the `-i' results switch:
>
> #+BEGIN_SRC makefile -i :tangle Makefile
>
> or set `org-src-preserve-indentation' non-nil.
>
> HTH,
>
> Chuck
--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Preserve tabs in tangled babel output
2015-03-11 15:09 ` John Kitchin
@ 2015-03-11 15:28 ` Charles C. Berry
2015-03-11 16:58 ` John Kitchin
2015-03-11 16:05 ` Roger Mason
1 sibling, 1 reply; 6+ messages in thread
From: Charles C. Berry @ 2015-03-11 15:28 UTC (permalink / raw)
To: John Kitchin; +Cc: Roger Mason, emacs-orgmode
On Wed, 11 Mar 2015, John Kitchin wrote:
> I have org-src-preserve-indentation set to t.
Are you saying this does not work on your setup?
When I copy/paste Roger's source block into a buffer, issue
`(setq-local org-src-preserve-indentation t)' in the buffer, put tabs
before the indented lines (there were only spaces in the gnus
*Article..* buffer), and tangle, the tabs are seen in the output file.
Chuck
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Preserve tabs in tangled babel output
2015-03-11 15:28 ` Charles C. Berry
@ 2015-03-11 16:58 ` John Kitchin
0 siblings, 0 replies; 6+ messages in thread
From: John Kitchin @ 2015-03-11 16:58 UTC (permalink / raw)
To: Charles C. Berry; +Cc: Roger Mason, emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 810 bytes --]
No I meant to confirm that it does work for me with that setting.
On Wednesday, March 11, 2015, Charles C. Berry <ccberry@ucsd.edu> wrote:
> On Wed, 11 Mar 2015, John Kitchin wrote:
>
> I have org-src-preserve-indentation set to t.
>>
>
> Are you saying this does not work on your setup?
>
> When I copy/paste Roger's source block into a buffer, issue
> `(setq-local org-src-preserve-indentation t)' in the buffer, put tabs
> before the indented lines (there were only spaces in the gnus *Article..*
> buffer), and tangle, the tabs are seen in the output file.
>
> Chuck
>
>
--
John
-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
[-- Attachment #2: Type: text/html, Size: 1323 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Preserve tabs in tangled babel output
2015-03-11 15:09 ` John Kitchin
2015-03-11 15:28 ` Charles C. Berry
@ 2015-03-11 16:05 ` Roger Mason
1 sibling, 0 replies; 6+ messages in thread
From: Roger Mason @ 2015-03-11 16:05 UTC (permalink / raw)
To: emacs-orgmode
Thank you Charles Berry and John Kitchin for your replies.
John Kitchin <jkitchin@andrew.cmu.edu> writes:
> I have org-src-preserve-indentation set to t.
>
> Charles C. Berry writes:
>
>> On Wed, 11 Mar 2015, Roger Mason wrote:
>>
>>> Hello,
>>>
>>> This code:
>>>
>>> #+BEGIN_SRC makefile :tangle Makefile
>>> hello: hello.f90
>>> gfortran hello.f90
>>>
>>> execute: hello
>>> ./a.out
>>>
>>> clean:
>>> rm -f a.out *.o
>>> #+END_SRC
>>>
>>> (stolen from John Kitchin) produces a Makefile with spaces instead of
>>> tabs. I created the content in makefile mode, with tabs, but emacs
>>> untabifies the output. How can I prevent this?
>>
>> Use the `-i' results switch:
>>
>> #+BEGIN_SRC makefile -i :tangle Makefile
>>
>> or set `org-src-preserve-indentation' non-nil.
The -i switch did not work for me but setting
org-src-preserve-indentation did.
Thanks again,
Roger
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-03-11 16:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-11 13:49 Preserve tabs in tangled babel output Roger Mason
2015-03-11 14:56 ` Charles C. Berry
2015-03-11 15:09 ` John Kitchin
2015-03-11 15:28 ` Charles C. Berry
2015-03-11 16:58 ` John Kitchin
2015-03-11 16:05 ` Roger Mason
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.