emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] BUG: Wrong indentation inside src block


From: Adam Porter
Subject: Re: [O] BUG: Wrong indentation inside src block
Date: Fri, 15 Apr 2016 19:57:10 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

fm4d <address@hidden> 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 <C-c '> 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.




reply via email to

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