From: Jiajian Huang <ispinfx@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode@gnu.org
Subject: Re: 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 [thread overview]
Message-ID: <CAMWOVxkLDB_yB-5L3i60nE-C-Pch-j68=fWL217pQscKFui_=g@mail.gmail.com> (raw)
In-Reply-To: <878tqo176n.fsf@nicolasgoaziou.fr>
[-- Attachment #1: Type: text/plain, Size: 1431 bytes --]
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 <mail@nicolasgoaziou.fr>
wrote:
> Hello,
>
> Jiajian Huang <ispinfx@gmail.com> 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
>
[-- Attachment #2: Type: text/html, Size: 2347 bytes --]
next prev parent reply other threads:[~2017-01-07 7:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-06 14:29 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/)] Jiajian Huang
2017-01-06 14:31 ` Jiajian Huang
2017-01-06 16:31 ` Nicolas Goaziou
2017-01-07 7:09 ` Jiajian Huang [this message]
2017-01-07 11:21 ` Nicolas Goaziou
2017-01-07 12:48 ` Jiajian Huang
2017-01-07 15:16 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMWOVxkLDB_yB-5L3i60nE-C-Pch-j68=fWL217pQscKFui_=g@mail.gmail.com' \
--to=ispinfx@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).