unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Madhu <enometh@meer.net>, emacs-devel@gnu.org
Subject: Re: newline-and-indent vs. electric-indent-mode
Date: Mon, 25 Jan 2021 13:59:35 +0200	[thread overview]
Message-ID: <dab858f7-c6b5-6785-ab60-28fea650833f@yandex.ru> (raw)
In-Reply-To: <m35z3ls3b8.fsf@leonis4.robolove.meer.net>

On 25.01.2021 12:45, Madhu wrote:
> * Dmitry Gutov <801ef866-4212-5b74-350e-9942953174fe@yandex.ru> :
> Wrote on Mon, 25 Jan 2021 04:29:55 +0200:
> 
>> On 25.01.2021 03:56, Madhu wrote:
>>> I used to be benefit from emacs indentation by binding RET to
>>> newline-and-indent and remain in control of indentation.
>>
>> How was it different?
>> newline-and-indent can lead to "spurious whitespace" just the same.
> 
> This is true now, and I'm not able to say with certainty what the
> difference was 10 years ago (if it indeed was different)

It wasn't different before electric-indent-mode was introduced.

> IIRC the way to deal with it was that if the next event after a
> newline-and-indent is *not* a self-insert-command, then empty whitespace
> on that line should have be cleaned up.

I've always had to use a third-party mode to clean up that whitespace, 
such as https://github.com/purcell/whitespace-cleanup-mode (most recently).

But what you're suggesting should be easy enough to implement in your 
personal config too, creating a wrapper for newline-and-indent.



  reply	other threads:[~2021-01-25 11:59 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22 13:53 newline-and-indent vs. electric-indent-mode Harald Jörg
2021-01-22 14:49 ` Stefan Monnier
2021-01-22 15:02   ` Dmitry Gutov
2021-01-22 15:09     ` Stefan Monnier
2021-01-22 22:43       ` Dmitry Gutov
2021-01-22 22:56         ` Stefan Monnier
2021-01-22 23:00           ` Dmitry Gutov
2021-01-22 23:16             ` Stefan Monnier
2021-01-23  0:45               ` Dmitry Gutov
2021-01-23  3:16                 ` Stefan Monnier
2021-01-24  2:54                   ` Dmitry Gutov
2021-01-24  5:29                     ` Stefan Monnier
2021-01-24 21:45                       ` Dmitry Gutov
2021-01-25  1:56                   ` Madhu
2021-01-25  2:29                     ` Dmitry Gutov
2021-01-25 10:45                       ` Madhu
2021-01-25 11:59                         ` Dmitry Gutov [this message]
2021-01-25 14:36                         ` Stefan Monnier
2021-01-25 14:42                           ` Dmitry Gutov
2021-01-25 15:15                             ` Stefan Monnier
2021-01-25 20:10                               ` Rudolf Schlatte
2021-01-26  2:04                               ` Dmitry Gutov
2021-01-26  2:43                                 ` Stefan Monnier
2021-01-26 15:58                               ` martin rudalics
2021-01-25  3:33                     ` Eli Zaretskii
2021-01-22 19:33   ` Harald Jörg
2021-01-22 22:05     ` Stefan Monnier
2021-01-23  2:19       ` Harald Jörg
2021-01-23  3:29         ` Stefan Monnier
2021-01-23 16:27           ` Harald Jörg

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=dab858f7-c6b5-6785-ab60-28fea650833f@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=enometh@meer.net \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).