GNU bug report logs - #50236
27.2; electric-pair-mode is inconvenient in comint

Previous Next

Package: emacs;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Sat, 28 Aug 2021 10:18:01 UTC

Severity: normal

Found in version 27.2

Full log


Message #25 received at 50236 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 50236 <at> debbugs.gnu.org
Subject: Re: bug#50236: 27.2; electric-pair-mode is inconvenient in comint
Date: Wed, 24 Aug 2022 12:19:35 +0200
Augusto Stoffel <arstoffel <at> gmail.com> writes:

> This makes sense.  However, in comint the "input" field has no field
> property; only the output is labeled as such.  So the suggestion to do
> something special if inside a field wouldn't solve the original problem
> described in the bug.

Ah, right.

> So the conclusion seems to be that a comint-specific
> electric-pair-skip-self function is needed (namely, one that narrows to
> the current field provided the current field property is nil, to avoid
> those performance issues.)

The other possible solution (that I mentioned, but didn't expand on) is
that we could just fix this in electric-pair without relying on
narrow-to-field.  That is, once electric-pair has found the matching
pair, we just look at the region between the two chars and see whether
they are part of the same field.  That should be reasonably fast, since
electric-pair already limits the range it's willing to search for a
pair.





This bug report was last modified 2 years and 267 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.