bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50236: 27.2; electric-pair-mode is inconvenient in comint


From: Lars Ingebrigtsen
Subject: bug#50236: 27.2; electric-pair-mode is inconvenient in comint
Date: Wed, 24 Aug 2022 12:19:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Augusto Stoffel <arstoffel@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.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]