From: Rainer M Krug <Rainer@krugs.de>
To: "Thomas S. Dye" <tsd@tsdye.com>
Cc: emacs-orgmode@gnu.org, Titus von der Malsburg <malsburg@posteo.de>
Subject: Re: [BUG] in last org in indentation of source blocks
Date: Fri, 29 May 2015 09:46:41 +0200 [thread overview]
Message-ID: <m2382fx1um.fsf@krugs.de> (raw)
In-Reply-To: <m2d21kfu0u.fsf@tsdye.com> (Thomas S. Dye's message of "Thu, 28 May 2015 08:15:29 -1000")
[-- Attachment #1: Type: text/plain, Size: 1947 bytes --]
tsd@tsdye.com (Thomas S. Dye) writes:
> Titus von der Malsburg <malsburg@posteo.de> 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
files.
Rainer
>
> 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: Rainer@krugs.de
Skype: RMkrug
PGP: 0x0F52F982
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]
next prev parent reply other threads:[~2015-05-29 7:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-28 11:49 [BUG] in last org in indentation of source blocks Rainer M Krug
2015-05-28 17:02 ` Titus von der Malsburg
2015-05-28 18:15 ` Thomas S. Dye
2015-05-28 18:50 ` Titus von der Malsburg
2015-05-29 7:46 ` Rainer M Krug [this message]
2015-05-29 7:45 ` Rainer M Krug
2015-05-29 7:59 ` Nicolas Goaziou
2015-05-29 8:10 ` Rainer M Krug
2015-05-29 8:03 ` [BUG] in last org in indentation of source blocks - confirmed with emacs -Q Rainer M Krug
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=m2382fx1um.fsf@krugs.de \
--to=rainer@krugs.de \
--cc=emacs-orgmode@gnu.org \
--cc=malsburg@posteo.de \
--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).