mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-26 07:33:39 +00:00
Fix heading insertion before any other headline but after a list
* lisp/org.el (org-insert-heading): with force-heading non-nil, inserting an heading before any headline, and just after a list would return an error.
This commit is contained in:
parent
dc904a834d
commit
afa0df9b47
@ -6855,7 +6855,7 @@ This is important for non-interactive uses of the command."
|
||||
(and (not (save-excursion
|
||||
(and (ignore-errors (org-back-to-heading invisible-ok))
|
||||
(org-on-heading-p))))
|
||||
(not (org-in-item-p))))
|
||||
(or force-heading (not (org-in-item-p)))))
|
||||
(progn
|
||||
(insert "\n* ")
|
||||
(run-hooks 'org-insert-heading-hook))
|
||||
|
Loading…
Reference in New Issue
Block a user