gusbrs <gusbrs.2...@gmail.com> writes: > I recently upgraded to Emacs 29.2 (from 29.1) and observed that > `org-insert-heading-respect-content' has changed behavior with regard > to how it handles blank lines at the end of the entry at which the > command was called. > > Consider the following document (with "|" representing point): > > ** |SubSec1 > > text > > ** SubSec2
> Calling `org-insert-heading-respect-content' ("C-RET") with Org > version 9.6.6 (built-in Emacs 29.1) would result in: > ... > ** | > > ** SubSec2 > > Now, with Org version 9.6.15 (built-in Emacs 29.2), it results in: > ... > ,** | > ,** SubSec2 > > That is an unfortunate change of behavior since those who like to keep > some breathing space at the end of entries now have to deal with it > manually after the heading is inserted. So the handy "C-RET" becomes > something like "C-RET RET C-b SPC". Plus the cost of having to think > about it, and that of occasionally forgetting it, consistency is just > harder to maintain. The number of blank lines after newly inserted is not defined by Org mode, unlike the number of blank lines before heading that is controlled by `org-blank-before-new-entry'. If you use M-<RET> rather then C-<RET> and set (setq org-blank-before-new-entry '((heading) (plain-list-item))) , you will get no newlines after the new heading inserted before current: * Sec1 ** <point>SubSec1 M-<RET> will yield * Sec1 ** <point> ** SubSec1 Would it make sense to add a new `org-blank-after-new-entry' customization that will provide explicit user control over what Org does when inserting a new heading? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>