emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Bug: org-edit-special does not indent the blank line after exit


From: Jiajian Huang
Subject: Re: [O] Bug: org-edit-special does not indent the blank line after exit editing [9.0.3 (9.0.3-elpa @ /Users/Yomisuko/.emacs.d/elpa/org-20161224/)]
Date: Sat, 7 Jan 2017 15:09:38 +0800

Hi,

Thanks for you reply. I cannot understand the design of `org-src-preserve-indentation`. 

Setting it to `nil` cause what described in my previous mail. 
Setting it to `t` lose the leading two spaces indentation/alignment in the origin org buffer. 

If it is `nil`, why inserting 2 leading spaces to the code in the org buffer except the line containing only spaces?

How can I get 

#+BEGIN_SRC python
    a = 1
    b = 2
    for i in range(10):
        # 6 spaces before '#'
#+END_SRC

after exit `org-edit-special` ?

Best regards,
Jiajian Huang

On Sat, Jan 7, 2017 at 12:31 AM, Nicolas Goaziou <address@hidden> wrote:
Hello,

Jiajian Huang <address@hidden> writes:

> Reproduce steps:
>
> Launch emacs by `emacs -Q`, eval the following snippet(assumed org 9.x
> is installed via elpa)
>
>     (package-initialize)
>     (require 'org)
>
> open a org buffer, input the source by <s and type `python`
>
> #+BEGIN_SRC python
>
> #+END_SRC
>
> use C-c ' to edit the block and input
>
>     for i in range(10):      # input this line and <enter>
>         # there are 4 spaces before the '#' now
>
> use C-c ' to close the source block buffer and back to org-mode, we can
> see the first line of the block is indented 2 spaces by org while the blank
> line
> isn't.

This is not a bug. See `org-src-preserve-indentation'.

Regards,

--
Nicolas Goaziou


reply via email to

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