From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] org-edit-special too much space if starting with empty block Date: Fri, 09 Nov 2012 01:23:16 +0100 Message-ID: <87sj8jlj4b.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWcRk-0000hX-04 for emacs-orgmode@gnu.org; Thu, 08 Nov 2012 19:27:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TWcRb-0003Vr-Pa for emacs-orgmode@gnu.org; Thu, 08 Nov 2012 19:27:43 -0500 Received: from mail-wi0-f171.google.com ([209.85.212.171]:33134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWcRb-0003Vk-Ix for emacs-orgmode@gnu.org; Thu, 08 Nov 2012 19:27:35 -0500 Received: by mail-wi0-f171.google.com with SMTP id hj13so54287wib.12 for ; Thu, 08 Nov 2012 16:27:34 -0800 (PST) In-Reply-To: (Le Wang's message of "Mon, 5 Nov 2012 22:31:01 +0800") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Le Wang Cc: Orgmode Mailing List Hello, Le Wang writes: > Some tests: > > Case 1: > > Start with emacs -Q > > I insert > > " > #+begin_src javascript > #+end_src > " > > with point before "#+end_src", I press " C-c ' " to start editing the source > > I enter "foobar" into the source buffer and immediately exit with " C-c ' " > > Case 2: > > restart with > > " > #+begin_src javascript > > #+end_src > " > > I've included a patch that fixes both issues. Thank you for your patch. Would you mind adding comments in the function in order to explain the need for two pass. Also, you may want to reverse the if test in order to get rid of the progn. Finally, could you provide the patch as "git format-patch" and add a changelog entry to it? Regards, -- Nicolas Goaziou