[Top][All Lists]

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

Re: [O] [BUG] in last org in indentation of source blocks

From: Rainer M Krug
Subject: Re: [O] [BUG] in last org in indentation of source blocks
Date: Fri, 29 May 2015 09:46:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin)

address@hidden (Thomas S. Dye) writes:

> Titus von der Malsburg <address@hidden> writes:
>> I can’t reproduce the second indent but I think it’s a bug that there is
>> any indentation at all.
>> The documentation of `org-edit-special' (C-x ') says:
>>   Call a special editor for the element at point. …
>> No mention of indentation or other reformatting of my code.
>> The same goes for `org-edit-src-exit' (C-c C-c) which says:
>>   Kill current sub-editing buffer and return to source buffer.
>> The edit-in-buffer feature should not touch the indentation.  If the
>> syntax of the language is sensitive to indentation (e.g. Python) this
>> can break the code.  Example:
>> #+BEGIN_SRC python :results output
>>   print "test"
>> #+END_SRC
>> is invalid Python syntax.
>> Also having one function perform two very different actions (edit code
>> in separate buffer *and* reformat the code) is poor design.  At least in
>> this special case.  When I open the code in a separate buffer but then
>> decide not to change it (C-c C-c), I'll end up with extra indentation
>> and this will create unnecessary changes when I commit the file in git.
> Does the variable org-src-preserve-indentation get the behavior you're
> after?

If I set it to nil, I don't have the runway indentation, if I set it to
non-nil, I have the runaway indentation.

But I can't use nil, as I need the indentation for tangling of some


> hth,
> Tom

Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      address@hidden

Skype:      RMkrug

PGP: 0x0F52F982

Attachment: signature.asc
Description: PGP signature

reply via email to

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