From 8bc5d40264cb7d0ef7c3538edc82bdf40f5dcc55 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sat, 2 Jan 2016 14:25:10 +0100 Subject: [PATCH] Fix `org-toggle-heading' * lisp/org.el (org-toggle-heading): Ensure partial list conversion to headlines do not get broken by missing newline characters. --- lisp/org.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index b426afd05..c600f2f76 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -21615,10 +21615,11 @@ number of stars to add." (when (org-at-item-p) ;; Pay attention to cases when region ends before list. (let* ((struct (org-list-struct)) - (list-end (min (org-list-get-bottom-point struct) (1+ end)))) + (list-end + (min (org-list-get-bottom-point struct) (1+ end)))) (save-restriction (narrow-to-region (point) list-end) - (insert (org-list-to-subtree (org-list-to-lisp t))))) + (insert (org-list-to-subtree (org-list-to-lisp t)) "\n"))) (setq toggled t)) (forward-line))) ;; Case 3. Started at normal text: make every line an heading, -- 2.11.4.GIT