all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: joaotavora@gmail.com (João Távora)
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: emacs-devel@gnu.org
Subject: Re: Emacs pretest -- electric-pair-mode change
Date: Wed, 02 Apr 2014 18:21:34 +0100	[thread overview]
Message-ID: <jjbtxabve8x.fsf@siscog.pt> (raw)
In-Reply-To: jwvsipvoq0h.fsf-monnier+emacs@gnu.org

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> Any chance this makes it to the pretests and 24.4?
>
> I don't think there's a hurry, in this respect.  It's a UI change, so we
> can change it later without breaking other people's code.

The problem is not breaking code, but users' expectations of the
upcoming feature. To undestand exactly what we're talking about: typing
a single " double quote in front with point at just before the "Hello"

    ss << Hello";

Will produce, both with and without the fix, the expected

    ss << "Hello";

But only with the fix will you get the same result when your buffer
contents are

    ss << Hello" << 42 << "World";

Without the fix you will get

    ss << ""Hello" << 42 << "World";

This last behaviour is also arguable but it is "way too clever", almost
buggy. The trunk's behaviour is better: it always inhibits pairing, the
surprising electric action, whenever there is unbalance, and as such is
more predictable.

>> `electric-pair-preserve-balance' is a new feature and the old behaviour
>> for quote-pairing will almost surely annoy any new adopters.
>
> We'll see if we get many complaints.

There might be complaints of people currently using my autopair.el that
follow my advice to go with electric-pair-mode in emacs 24.4. But I
can/will only tell them that once 24.4 is out.

>> Anyway I've haven't gotten little feedback for this feature, negative or
>> positive.
>
> `electric-pair-mode' (even the old one) is not a commonly used option,
> IIUC.  This is largely because it's not enabled by default, many people
> don't like/want such a feature, and those who do want it have many ways
> to get it, many of which predate electric-pair-mode.

There is a fair, maybe even great, number of people using autopair.el,
which does what Emacs's trunk now does, and smartparens.el which doesn't
provide any balancing at all.

But both being predictable, these users these packages are less likely
to switch or even try electric-pair-mode if it feels alien or hard to
predict, which IMO was *exactly* the problem with the "old"
electric-pair-mode.

> I do hope/expect it to become the standard way to get the feature,
> but it'll take a little while to get there.

I'm not arguing that it should be made default in 24.4 or even later
versions, but you can expect a slower route if releases contain this
particular gratutious idiosyncrasy, one that I regret having implemented
back in october without sufficent review/feedback (or am I mistaken and
did you or anyone else think about this particular edge case?)

João



  reply	other threads:[~2014-04-02 17:21 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CADWZ7fJCws0SO1hEn38CpbRMq+Uw397uCFUnA=YJvOaLVEA8UQ@mail.gmail.com>
2014-03-31 13:27 ` Emacs pretest Stefan Monnier
2014-03-31 13:52   ` Bastien
2014-03-31 14:36   ` Tassilo Horn
2014-03-31 15:55   ` João Távora
2014-03-31 16:34     ` Stefan Monnier
2014-04-02 10:11       ` Emacs pretest -- electric-pair-mode change João Távora
2014-04-02 12:58         ` Stefan Monnier
2014-04-02 17:21           ` João Távora [this message]
2014-04-02 22:58             ` Stefan Monnier
2014-04-03 11:06               ` João Távora
2014-04-03 14:22                 ` Stefan Monnier
2014-04-03 16:56                   ` João Távora
2014-04-03 17:33                     ` Stefan Monnier
2014-04-03 20:11                       ` João Távora
2014-04-03 20:54                         ` Stefan Monnier
2014-04-04  8:08                           ` João Távora
2014-04-04 12:53                             ` Stefan Monnier
2014-04-04 23:31                               ` João Távora
2014-04-05 15:29                                 ` Stefan Monnier
2014-04-07  7:43                                   ` João Távora
2014-04-07 14:04                                     ` Stefan Monnier
2014-04-04  7:53                         ` Eli Zaretskii
2014-04-04  9:49                           ` João Távora
2014-04-11 14:42                       ` Kevin Rodgers
2014-04-11 15:53                         ` Stefan Monnier
2014-04-11 18:23                           ` João Távora
2014-04-11 19:58                             ` Stefan Monnier
2014-04-12  0:42                               ` João Távora
2014-04-11 16:08                         ` João Távora
2014-04-03 19:13                   ` Eli Zaretskii
2014-04-03 12:15             ` Dmitry Gutov
2014-04-03 13:43               ` João Távora
2014-04-03 15:24                 ` Stefan Monnier
2014-04-03 14:24               ` Stefan Monnier
2014-04-01 15:15   ` Emacs pretest Dmitry Antipov
2014-04-01 16:36     ` Dmitry Antipov
2014-04-02 12:37       ` Stefan Monnier
2014-04-01 20:50   ` Stephen Berman

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=jjbtxabve8x.fsf@siscog.pt \
    --to=joaotavora@gmail.com \
    --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.