bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51459: 29.0.50; org-return and org-return-and-maybe-indent


From: Andreas Röhler
Subject: bug#51459: 29.0.50; org-return and org-return-and-maybe-indent
Date: Thu, 28 Oct 2021 19:54:05 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:78.0) Gecko/20100101 Thunderbird/78.14.0


On 28.10.21 15:40, Kévin Le Gouguec wrote:
Andreas Röhler <andreas.roehler@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.

Censored as bug was making RET und C-j behave likewise, i.e. not indenting either.


When calling C-u RET, get "org--newline: Wrong type argument:
number-or-marker-p, (4)"
That does look like a bug, however.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]