Hello,

Thanks for you reply.

I'm not trying to get the empty line. The example snippet is just for illustration.

First of all, I really like the two space indentation/alignment when `org-src-preserve-indentation` is set to `nil`. And since org does not indent the empty lines, the fields one empty of `yasnippet` or packages which generate empty lines can not work properly and the indentation of these lines are violated as mentioned in the second mail.

Best regards,
Jiajian Huang

On Sat, Jan 7, 2017 at 7:21 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
Hello,

Jiajian Huang <ispinfx@gmail.com> writes:

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

Probably because empty lines are not meaningful anyway. We probably
should go further and remove all spaces in empty lines.

> 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` ?

You cannot obtain the last empty line. I don't understand why would you
want that either. It is only a TAB away from an empty line.


Regards,

--
Nicolas Goaziou