GNU bug report logs - #51459
29.0.50; org-return and org-return-and-maybe-indent

Previous Next

Package: emacs;

Reported by: Andreas Röhler <andreas.roehler <at> easy-emacs.de>

Date: Thu, 28 Oct 2021 10:18:02 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: 51459 <at> debbugs.gnu.org
Subject: bug#51459: 29.0.50; org-return and org-return-and-maybe-indent
Date: Thu, 28 Oct 2021 15:40:33 +0200
Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:

> 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.

And everything hinges on what one finds "reasonable".

As discussed in bug#51167, in the wake of electric-indent-mode being
honored in Org 9.4, plenty of people have come to emacs-orgmode to
express that they did not expect RET to indent.  Thus Org maintainers
chose to change the default value of org-adapt-indentation for Org 9.5.

Note that by default (electric-indent-mode t, org-adapt-indentation nil)
RET *does* indent in some specific scenarios, e.g. "- list item RET"
will indent (resp. with electric-indent-mode nil, "- list item C-j"),
because Org assumes that you want to add a paragraph to your list item.

To recap:

- electric-indent-mode is enabled by default in Org, as it is globally
  in Emacs: hence RET indents, C-j does not.

- org-adapt-indentation tells Org whether you want your documents to be
  hard-indented or not: starting with 9.5, they won't be by default.

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

That does look like a bug, however.




This bug report was last modified 3 years and 265 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.