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

Augusto Stoffel <[email protected]>
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
On Sat,  8 Aug 2026, Ihor Radchenko wrote:

> Augusto Stoffel <[email protected]> writes:
>
>> I've added Ihor to the discussion since the issue affects Org mode as
>> well (see my email of 22 Aug 2022 in this thread).  WDYT?
>
> Why not using paragraph boundaries in addition to fields?

Interesting idea.  This makes a lot of sense for prose, but it would
severely disrupt electric pair mode for code.  Even in Org mode, the
right context to look for a matching delimiter would be the entire block
when inside a code block, otherwise the current paragraph.

I'm convinced that modes (or the avid user) should have a way to
determine the search bounds for a matching delimiter though a function
option.  In comint-mode that function would return the bounds of the
current field (modulo optimizations) but other modes would be free to
implement whatever makes sense in their context.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.