emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
To: Jarmo Hurri <jarmo.hurri@iki.fi>
Cc: emacs-orgmode@gnu.org
Subject: Re: Binding RET to org-return-and-maybe-indent
Date: Wed, 22 Jul 2020 16:50:43 +0200	[thread overview]
Message-ID: <87sgdjhad8.fsf@gmail.com> (raw)
In-Reply-To: <878sfbycip.fsf@iki.fi> (Jarmo Hurri's message of "Wed, 22 Jul 2020 15:12:14 +0300")

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	other threads:[~2020-07-22 14:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-22 12:12 Jarmo Hurri
2020-07-22 14:50 ` Kévin Le Gouguec [this message]
2020-07-23  5:55   ` Jarmo Hurri
2020-07-23  9:52   ` Jarmo Hurri
2020-07-23 15:00     ` Kévin Le Gouguec
2020-07-24  4:26       ` Jarmo Hurri
2020-07-24 16:59         ` Kévin Le Gouguec
2020-07-27 10:18           ` Jarmo Hurri
2020-07-27 13:12             ` [PATCH] Fix recommendation in ORG-NEWS (was: Binding RET to org-return-and-maybe-indent) Kévin Le Gouguec
2020-07-29  1:51               ` Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sgdjhad8.fsf@gmail.com \
    --to=kevin.legouguec@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jarmo.hurri@iki.fi \
    --subject='Re: Binding RET to org-return-and-maybe-indent' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).