Subject: 29.0.50; org-return and org-return-and-maybe-indent

From: Andreas Röhler <[email-masked]>
Date: Thu, 28 Oct 2021 12:17:26 +0200

With cursor at EOL at some org-mode buffer with

* Foo

neither RET (org-return &optional INDENT ARG INTERACTIVE)
nor C-j (org-return-and-maybe-indent) does indent

Doing M-x electric-indent-mode RET don't change that.

When calling C-u RET, get "org--newline: Wrong type argument: 
number-or-marker-p, (4)"

When at start of second line now, TAB doesn't indent either.

When in init-file

(add-hook 'org-mode-hook (lambda () (electric-indent-mode -1)))
(setq org-adapt-indentation t)

C-j would indent.

However, IMO doesn't make sense to require these extra config in order
to get a reasonable behavior.

‘org-return-and-maybe-indent’ and ‘org-return’ should not provide the same,.

One of them should indent, suggesting that with "indent" in its name.

^^+In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 
2.24.32, cairo version 1.16.0)
  of 2021-10-14 built on affe
Repository revision: 64f9fdc812bb2e1f533ae294355d33396985e469
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Ubuntu 20.04.3 LTS

Configured using:
  'configure --with-modules --with-mailutils'

Configured features:
ACL CAIRO FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK2
ZLIB

Important settings:
   value of $LANG: de_DE.UTF-8
   locale-coding-system: utf-8-unix

Major mode: Org

Minor modes in effect:
   tooltip-mode: t
   global-eldoc-mode: t
   show-paren-mode: t
   electric-indent-mode: t
   mouse-wheel-mode: t
   tool-bar-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   line-number-mode: t
   indent-tabs-mode: t
   transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr dabbrev emacsbug sendmail shortdoc help-fns
radix-tree org-element avl-tree generator ol-eww eww xdg url-queue
thingatpt mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect
gnus-search eieio-opt cl-extra help-mode speedbar ezimage dframe
gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr kinsoku
svg dom browse-url url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util url-parse url-vars mailcap
gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap
nnmail mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int
gnus-range message rmc puny rfc822 mml mml-sec epa derived epg rfc6068
epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map rfc2047 rfc2045 ietf-drums
text-property-search mail-utils mm-util mail-prsvr wid-edit ol-docview
doc-view jka-compr image-mode exif dired dired-loaddefs ol-bibtex bibtex
iso8601 ol-bbdb ol-w3m ol-doi org-link-doi org ob ob-tangle ob-ref
ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint
org-pcomplete pcomplete comint ansi-color ring org-list org-faces
org-entities time-date noutline outline easy-mmode org-version
ob-emacs-lisp ob-core ob-eval org-table ol rx org-keys oc seq gv subr-x
byte-opt bytecomp byte-compile cconv org-compat advice org-macs
org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs
cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads inotify dynamic-setting
system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit
x multi-tty make-network-process emacs)

Memory information:
((conses 16 275176 16564)
  (symbols 48 43130 6)
  (strings 32 115505 2450)
  (string-bytes 1 2708623)
  (vectors 16 37688)
  (vector-slots 8 413290 29577)
  (floats 8 295 99)
  (intervals 56 310 0)
  (buffers 992 12))