emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Binding RET to org-return-and-maybe-indent


From: Kévin Le Gouguec
Subject: Re: Binding RET to org-return-and-maybe-indent
Date: Wed, 22 Jul 2020 16:50:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Jarmo Hurri <jarmo.hurri@iki.fi> writes:

> Is there any downside to binding RET to org-return-and-maybe-indent?
>
> I want to remove RET indentation in org mode. For example
>
> # ---------------------------------------------------------------
> * Demo of indentation
>   - when I press return at the end of the word THIS
>   - I get indentation
> # ---------------------------------------------------------------

RET indentation is something that has been introduced recently on the
master branch (which will become Org 9.4 soon).  In Org 9.3, with your
example, RET does not indent, while C-j does.

As ORG-NEWS notes, if you want RET to stop indenting, you can disable
electric-indent-mode in org-mode-hook:

#+begin_src emacs-lisp
(add-hook 'org-mode-hook (lambda () (electric-indent-mode -1)))
#+end_src

> However, if I call org-return-and-maybe-indent at the same point, I do
> not get indentation.
>
> But would changing the binding of RET cause issues elsewhere?

I can't think of any bad side-effect, but my imagination might be
lacking.  The only downside I can think of is that RET will become
redundant with C-j.



reply via email to

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