diff --git a/lisp/org.el b/lisp/org.el index b1022fdde..a6451c14d 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -7714,7 +7714,8 @@ This is important for non-interactive uses of the command." (when respect-content (org-end-of-subtree nil t) (skip-chars-backward " \r\n") - (and (looking-at "[ \t]+") (replace-match "")) + (and (not (looking-back "^\*+")) + (looking-at "[ \t]+") (replace-match "")) (unless (eobp) (forward-char 1)) (when (looking-at "^\\*") (unless (bobp) (backward-char 1))