From: Alan Mackenzie <acm@muc.de>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: Stefan <monnier@IRO.UMontreal.CA>, emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478.
Date: Thu, 3 Apr 2014 21:53:04 +0000 [thread overview]
Message-ID: <20140403215304.GB3918@acm.acm> (raw)
In-Reply-To: <5339A1DE.8030807@yandex.ru>
Hello, Dmitry.
On Mon, Mar 31, 2014 at 08:11:58PM +0300, Dmitry Gutov wrote:
> On 30.03.2014 17:57, Alan Mackenzie wrote:
> >> This could be considered a reason to improve the
> >> indent-line-function in text-mode. `indent-relative' offers behavior
> >> that's pretty close. Maybe it could be made to follow the behavior
> >> of auto-fill even closer.
> > Notice, here, how we're no longer talking about electric indentation, but
> > rather about newline-and-indent. The two topics are distinct.
> Yes, but I think we're discussing both in this thread. FWIW, I think
> we're in agreement about electric indentation on RET. See my message
> here, and also Stefan's reply:
> http://lists.gnu.org/archive/html/emacs-devel/2014-03/msg00936.html
> http://lists.gnu.org/archive/html/emacs-devel/2014-03/msg00957.html
Yes, I think we're in agreement with eachother, but not with Stefan. He
has decided to conflate the RET/C-j bindings and electric-indent-mode,
and to have these bindings apparently flip each time e-i-m is called.
He's also decided to do this although there's never been any meaningful
discussion of it here, and there isn't going to be any.
> > I usually think of html, markdown, and such like, as the "etc." in
> > "programming modes (etc.)".
> Yeah, okay. Which other modes exactly need newline-and-indent on RET
> could be a matter of debate, but one possible criteria is "mode has a
> meaningful/specialized indentation function".
Hmm. I'm not sure that gets us very far, in practice. What does
"meaningful/specialized" mean? I'll be more specific: programming modes
which use syntactic indentation (i.e. most of them) and the various
markup-like modes which are "like" programming languages.
> > I think RET should do the most natural sort of newline, and C-j the
> > subsidiary one, whatever they may happen to be for a particular mode.
> Sounds okay, I guess.
> >> As long as this new mode is divorced from electric-indent-mode, I'd be
> >> happy.
> > This is a key point.
> It could be something called like `old-newline-keys-mode'. Appropriate
> major modes would swap RET and C-j bindings, and the above minor mode
> would force them all back to (RET C-j) -> (newline newline-and-indent).
Again, Stefan has decided there will be no such new mode, and that its
functionality is going to be twisted up with electric-indent-mode, rather
than being independent of it. It now seems us discussing this further
would just be a waste of time.
> >> This specific behavior is a consequence of using `newline-and-indent'.
> > No, not at all. It's a consequence of electric behaviour getting
> > entangled with newline-and-indent.
> It's the same if I disable `electric-indent-mode' but bind RET to
> `newline-and-indent'.
> And if `electric-indent-mode' didn't do `-and-indent' but retained the
> electric indent on RET, a similar example is easy to demonstrate:
> foo
> bar|
> Press RET, see the same result.
Yes. Again, if we're in a programming mode that's what we want nearly
all the time - it's what electric indentation is for (despite all the
disadvantages of doing it on \n). In non-programming modes it's what we
don't want. It now seems Somebody (tm) is going to have to trawl through
all major modes disabling electric indentation for lots of them.
> IOW, text-mode could be considered in trouble if RET triggers call to
> indentation at any line.
Yes indeed.
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2014-04-03 21:53 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1WFSpO-0001e7-Gm@vcs.savannah.gnu.org>
2014-02-18 0:11 ` [Emacs-diffs] trunk r116461: Connect electric-indent-mode up with CC Mode. Bug #15478 Stefan Monnier
2014-02-22 18:27 ` Alan Mackenzie
2014-02-25 3:24 ` Stefan Monnier
2014-02-28 19:50 ` Alan Mackenzie
2014-03-01 15:57 ` Stefan Monnier
2014-03-02 11:51 ` Alan Mackenzie
2014-03-04 3:48 ` Stefan Monnier
2014-03-08 22:58 ` Alan Mackenzie
2014-03-09 1:57 ` Stefan Monnier
2014-03-09 12:37 ` Alan Mackenzie
2014-03-10 3:37 ` Stefan Monnier
2014-03-10 6:59 ` Glenn Morris
2014-03-10 12:24 ` João Távora
2014-03-10 18:30 ` Stefan Monnier
2014-03-16 22:35 ` Alan Mackenzie
2014-03-17 15:48 ` Stefan
2014-03-19 22:42 ` Alan Mackenzie
2014-03-20 1:46 ` Stefan
2014-03-20 8:35 ` Thien-Thi Nguyen
2014-03-21 8:24 ` João Távora
2014-03-22 13:13 ` Alan Mackenzie
2014-03-22 16:14 ` Stefan
2014-03-22 20:19 ` David Caldwell
2014-03-22 22:05 ` David Kastrup
2014-03-22 22:32 ` David Caldwell
2014-03-24 1:13 ` Stefan
2014-03-22 22:34 ` Alan Mackenzie
2014-03-24 1:37 ` Stefan
2014-03-24 22:40 ` Alan Mackenzie
2014-03-25 1:37 ` Dmitry Gutov
2014-03-26 20:53 ` Alan Mackenzie
2014-03-27 8:02 ` Dmitry Gutov
2014-03-30 14:57 ` Alan Mackenzie
2014-03-31 17:11 ` Dmitry Gutov
2014-04-03 21:53 ` Alan Mackenzie [this message]
2014-03-25 1:54 ` Stefan
2014-03-26 21:21 ` Alan Mackenzie
2014-03-27 14:49 ` Stefan Monnier
2014-03-30 11:37 ` Alan Mackenzie
2014-03-30 16:46 ` Stefan Monnier
2014-03-22 23:10 ` Alan Mackenzie
2014-03-24 1:39 ` Stefan
2014-03-24 6:59 ` Stephen J. Turnbull
2014-03-24 9:08 ` Dmitry Gutov
2014-03-24 17:19 ` Eli Zaretskii
2014-03-24 17:29 ` David Kastrup
2014-03-24 17:39 ` David Kastrup
2014-03-24 17:38 ` Dmitry Gutov
2014-03-24 17:52 ` Eli Zaretskii
2014-03-25 1:53 ` Dmitry Gutov
2014-03-25 3:49 ` Eli Zaretskii
2014-03-24 18:32 ` Stefan
2014-03-25 1:49 ` Dmitry Gutov
2014-03-25 7:44 ` Stephen J. Turnbull
2014-03-25 8:08 ` Steinar Bang
2014-03-25 16:49 ` Stephen J. Turnbull
2014-03-25 17:08 ` Steinar Bang
2014-03-25 17:31 ` Dmitry Gutov
2014-03-25 19:28 ` Steinar Bang
2014-03-25 19:49 ` David Kastrup
2014-03-25 19:54 ` Dmitry Gutov
2014-03-25 13:26 ` Stefan Monnier
2014-03-27 7:51 ` Stephen J. Turnbull
2014-03-24 21:12 ` Alan Mackenzie
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140403215304.GB3918@acm.acm \
--to=acm@muc.de \
--cc=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.