diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 1d69d9b99..8e15d91b2 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -13,6 +13,27 @@ Please send Org bug reports to mailto:emacs-orgmode@gnu.org. * Version 9.7 (not released yet) ** Important announcements and breaking changes +*** ~org-insert-subheading~ no longer inserts a sub-heading above current when point is at the beginning of line + +Previously, calling ~org-insert-subheading~ on + +: * Heading 1 +: * Heading 2 + +yielded + +: * Heading 1 +: ** +: * Heading 2 + +This is no longer the case. The sub-heading is always created below +current heading (prefix arguments have the same meaning as in +~org-insert-heading~): + +: * Heading 1 +: * Heading 2 +: ** + *** Org mode now fontifies whole table lines (including newline) according to ~org-table~ face Previously, leading indentation and trailing newline in table rows diff --git a/lisp/org.el b/lisp/org.el index d09699388..911194797 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6633,8 +6633,12 @@ unchecked check box." (defun org-insert-subheading (arg) "Insert a new subheading and demote it. -Works for outline headings and for plain lists alike." +Works for outline headings and for plain lists alike. +The prefix argument ARG is passed to `org-insert-heading'. +Unlike `org-insert-heading', when point is at the beginning of a +heading, still insert the new sub-heading below." (interactive "P") + (when (bolp) (forward-char)) (org-insert-heading arg) (cond ((org-at-heading-p) (org-do-demote))