unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: gnu-emacs-bug@moderators.isc.org
Subject: bug#16155: 24.3.50;
Date: Sun, 15 Dec 2013 20:01:29 +0000 (UTC)	[thread overview]
Message-ID: <l8l1qp$2783$1@colin.muc.de> (raw)
In-Reply-To: <E1VsAAu-0005lV-5P@fencepost.gnu.org>

Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> Richard Stallman <rms@gnu.org> wrote:
>> I don't ever like having newline indent.

I agree.  `newline' should never indent the new line.  `newline-and-indent'
should always indent the new line.

>> It should be a minor mode,

> It is a minor mode.  Called electric-indent-mode, and no enabled by default.
> See NEWS.

electric-indent-mode _is_ enabled by default in the current trunk.  I've
just updated, built, and tried it.

>> and the documentation of `newline' should explain how to easily turn
>> this off.

> The docstring does mention the indentation behavior, with a link to
> electric-indent-mode.

What the docstring says is this:

    A non-nil INTERACTIVE argument means to run the `post-self-insert-hook',
    which by default will also indent the line (see `electric-indent-mode').

Presumably the invocation of `newline' by pressing the RET key leaves
INTERACTIVE set to nil.  Nevertheless, the unwanted indentation happened.

This is bad documentation, since it describes the internal workings rather
than the coherent functionality.  As a user of `newline', I shouldn't have
to know about `post-self-insert-hook', never mind having to try to figure
out which way to set INTERACTIVE.

I can't make out what that bit of the doc string means without a
considerable investment of intellectual effort.

Again, the question: why should `newline' indent when we've got the specific
command `newline-and-indent'?  I think a good way to resolve the current
confusion would be to restrict electric-indent-mode to indenting ONLY the
line in which the character is typed, and leaving the indentation of any
new line to `newline-and-indent'.

>        Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).






  parent reply	other threads:[~2013-12-15 20:01 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-15 11:47 bug#16155: 24.3.50; Richard Stallman
2013-12-15 13:05 ` Stefan Monnier
2013-12-15 19:50   ` Richard Stallman
     [not found] ` <mailman.9297.1387112779.10748.bug-gnu-emacs@gnu.org>
2013-12-15 20:01   ` Alan Mackenzie [this message]
2013-12-15 20:37     ` Jarek Czekalski
2013-12-16 14:19     ` Stefan Monnier
2013-12-16 17:01       ` bug#16155: 24.3.50; electric indent gripes Jarek Czekalski
2013-12-16 18:58         ` Stefan Monnier
     [not found]         ` <mailman.9406.1387220358.10748.bug-gnu-emacs@gnu.org>
2013-12-18 22:16           ` Alan Mackenzie
2013-12-17 10:50       ` bug#16155: 24.3.50; Richard Stallman
     [not found]       ` <<E1VssEJ-0000fE-Ii@fencepost.gnu.org>
2013-12-17 22:39         ` Drew Adams
2013-12-17 23:13           ` Josh
2013-12-18  0:54             ` Drew Adams
2013-12-21  5:01               ` Josh
2013-12-23  3:07                 ` Stefan Monnier
2013-12-24  3:26                   ` Richard Stallman
2013-12-24  4:16                     ` Stefan Monnier
2013-12-24 23:49                       ` Alan Mackenzie
2013-12-25 16:54                         ` Stefan Monnier
     [not found]     ` <mailman.9377.1387203628.10748.bug-gnu-emacs@gnu.org>
2013-12-18 22:28       ` Alan Mackenzie
2013-12-19 13:31         ` Stefan Monnier
2013-12-19 17:15           ` Glenn Morris
2013-12-19 18:02           ` bug#16155: Strange moderator address. [Re: bug#16155: 24.3.50;] Alan Mackenzie
2013-12-19 18:12             ` Glenn Morris
2013-12-19 19:55               ` Alan Mackenzie
2013-12-19 20:13                 ` Glenn Morris
2013-12-19 20:46                   ` Alan Mackenzie
2013-12-19 18:19         ` bug#16155: 24.3.50; Richard Stallman
2022-05-05 12:51 ` bug#16155: bug#16156: electric indent gripes Lars Ingebrigtsen

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='l8l1qp$2783$1@colin.muc.de' \
    --to=acm@muc.de \
    --cc=gnu-emacs-bug@moderators.isc.org \
    /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).