Nicolas Goaziou writes: > Kévin Le Gouguec writes: > >> Do you think a patch that >> >> - tweaked org-return (bound to RET) to default its INDENT argument to >> the current value of electric-indent-mode, After taking an in-depth look at 'org-return' and 'newline', I decided to "let the knife do the work" and simply keep calling 'newline', though with additional arguments: - INTERACTIVE is what makes 'newline' run 'post-self-insert-hook' (thus triggering indentation through electric-indent-mode), - ARG wasn't strictly necessary, but it seemed harmless to add it, and it allows inserting multiple newlines, thus removing one more "Org idiosyncrasy". I felt that introducing org--newline made the code clearer, but I can understand if it seems too trivial to keep. I took the liberty of using this function in the "list item" case too, otherwise there's no way to indent the trailing text. > The change will not appear overnight in Org, i.e., not in Org stable's > branch (Org 9.3.X), and it will be announced in ORG-NEWS. I'll work on ORG-NEWS (plus Changelog entries, plus unit tests) as soon as I'm confident that my approach is satisfactory. (Out of curiosity, could it be argued that this is solving a "bug" in org-mode and, as such, could be committed to Emacs core first, then backported to the org-mode repository? I don't feel strongly either way, I wouldn't want to make things more complicated for Org maintainers.) Now for C-j, in order to minimize breakage (for anyone calling org-return-indent from Lisp code) and simplify disabling the new behaviour (by simply turning off electric-indent-mode in Org), should we bind C-j to a new function? E.g.: (defun org-return-and-maybe-indent () (interactive) (org-return (not electric-indent-mode))) Thank you for your time.