From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: [BUG] in last org in indentation of source blocks Date: Fri, 29 May 2015 09:46:41 +0200 Message-ID: References: <87oal4y6ri.fsf@posteo.de> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyF0C-0007L4-Tz for emacs-orgmode@gnu.org; Fri, 29 May 2015 03:46:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyF09-0007gL-Nq for emacs-orgmode@gnu.org; Fri, 29 May 2015 03:46:48 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:34953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyF09-0007eB-Ht for emacs-orgmode@gnu.org; Fri, 29 May 2015 03:46:45 -0400 Received: by wgme6 with SMTP id e6so55329808wgm.2 for ; Fri, 29 May 2015 00:46:44 -0700 (PDT) In-Reply-To: (Thomas S. Dye's message of "Thu, 28 May 2015 08:15:29 -1000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Thomas S. Dye" Cc: emacs-orgmode@gnu.org, Titus von der Malsburg --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable tsd@tsdye.com (Thomas S. Dye) writes: > Titus von der Malsburg writes: > >> I can=E2=80=99t reproduce the second indent but I think it=E2=80=99s a b= ug 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. =E2=80=A6 >> >> 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 =2D-=20 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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBAgAGBQJVaBlhAAoJENvXNx4PUvmCe40H/2MC/xePUhat0+Xa0nbcVuE4 iZzPK6dcJloEs2x09rLzHcmSw7IwuT9ShU4ip2cLQ1jFCyAgrYQ3708VxfIUue8f zXsb2oFgzY73TBK2fZYWvDXAgCMdsEPmgjM9WDJDrqFwwTQXbhJWQLmnqFm7o0ZV de91ezuXVZhvl/XqC+ptPBZFeBhUixWH368KsD1mXie12fM9GUplDckAiFNP7PL2 Hy5A7wVRf3tR5f+joj5fW+K/L2x8CdWr6v6ilGJ/qwHDFca6DwNoUgD3wdcDx9td 5GXYkPxXpaHPdZSvT9xnvmbpRPmn8Y43zZNxgu4zINOhVGLWO2swxgMbMgrqu5o= =z9nR -----END PGP SIGNATURE----- --=-=-=--