From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Porter Subject: Re: BUG: Wrong indentation inside src block Date: Fri, 15 Apr 2016 19:57:10 -0500 Message-ID: <87bn5axteh.fsf@alphapapa.net> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arEYC-0003d9-Dg for emacs-orgmode@gnu.org; Fri, 15 Apr 2016 20:57:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1arEY9-0001Sr-73 for emacs-orgmode@gnu.org; Fri, 15 Apr 2016 20:57:28 -0400 Received: from plane.gmane.org ([80.91.229.3]:34472) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arEY9-0001S5-0J for emacs-orgmode@gnu.org; Fri, 15 Apr 2016 20:57:25 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1arEY6-0008SB-HY for emacs-orgmode@gnu.org; Sat, 16 Apr 2016 02:57:22 +0200 Received: from 172-0-42-27.lightspeed.ltrkar.sbcglobal.net ([172.0.42.27]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 16 Apr 2016 02:57:22 +0200 Received: from adam by 172-0-42-27.lightspeed.ltrkar.sbcglobal.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 16 Apr 2016 02:57:22 +0200 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" To: emacs-orgmode@gnu.org fm4d writes: > Hello, I found an indentation bug in the master branch. > > Steps to reproduce: > > * Test 1 > ** Test 2 > #+BEGIN_SRC emacs-lisp > (setq foo 1 > bar 2) > #+END_SRC > > Paste this code into org-mode buffer with org-startup-indented turn on > org-indented-mode. You should see the src block missindented like this: > > (setq foo 1 > bar 2) > > I've tracked this bug to this commit > http://repo.or.cz/org-mode.git/commit/a311a856514e9245074b02c89d51a9f339784d1c Hm, I'm not sure I understand the problem. Org doesn't automatically reindent source blocks, as far as I know. You can and reindent the source buffer, and then when you save it it will be reflected in the Org buffer. I made a little function to do that as a command, which I could share if you like. Also, the examples you gave have mixed spaces and tabs, so it's hard to tell whether they're indented correctly. For example, I see the second example indented correctly, while the first is not. You might try turning on whitespace-mode, which makes it easy to see where they are. BTW, that commit is a large merge commit, so it's hard to see where the problem would be. You could try bisecting it on the branch it was merged from.