emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals-release/org fb30301 1/3: lisp/org.el: Fix bug about ins


From: ELPA Syncer
Subject: [elpa] externals-release/org fb30301 1/3: lisp/org.el: Fix bug about inserting a heading before the first headline
Date: Sat, 1 May 2021 12:57:23 -0400 (EDT)

branch: externals-release/org
commit fb30301888dcc567dac13ea266098e6b4f32f3a7
Author: Bastien Guerry <bzg@gnu.org>
Commit: Bastien Guerry <bzg@gnu.org>

    lisp/org.el: Fix bug about inserting a heading before the first headline
    
    * lisp/org.el (org-insert-heading): Fix bug when inserting a
    heading before the first headline.
    
    Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
    Link: https://orgmode.org/list/875z73br32.fsf@gmail.com/
---
 lisp/org.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/org.el b/lisp/org.el
index 28628bd..d81ec98 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6947,6 +6947,7 @@ unconditionally."
         (when (equal arg '(16)) (org-up-heading-safe))
         (org-end-of-subtree)))
       (unless (bolp) (insert "\n"))
+      (unless level (backward-char))
       (unless (and blank? (org-previous-line-empty-p))
        (org-N-empty-lines-before-current (if blank? 1 0)))
       (insert stars " ")



reply via email to

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