From mboxrd@z Thu Jan 1 00:00:00 1970 From: Le Wang Subject: [PATCH] org-edit-special too much space if starting with empty block Date: Mon, 5 Nov 2012 22:31:01 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=20cf300fb1e9a8489d04cdc0558a Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVNhl-0001Xm-Ph for emacs-orgmode@gnu.org; Mon, 05 Nov 2012 09:31:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVNhg-0004mZ-57 for emacs-orgmode@gnu.org; Mon, 05 Nov 2012 09:31:09 -0500 Received: from mail-qc0-f169.google.com ([209.85.216.169]:56849) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVNhg-0004mP-0e for emacs-orgmode@gnu.org; Mon, 05 Nov 2012 09:31:04 -0500 Received: by mail-qc0-f169.google.com with SMTP id t2so3038603qcq.0 for ; Mon, 05 Nov 2012 06:31:01 -0800 (PST) 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: Orgmode Mailing List --20cf300fb1e9a8489d04cdc0558a Content-Type: text/plain; charset=ISO-8859-1 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. -- Le --20cf300fb1e9a8489d04cdc0558a Content-Type: application/octet-stream; name="org-src.el.3.diff" Content-Disposition: attachment; filename="org-src.el.3.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h95otbzh0 ZGlmZiAtLWdpdCBhL2xpc3Avb3JnLXNyYy5l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