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

João Távora <[email protected]>
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
Ihor Radchenko <[email protected]> writes:

> João Távora <[email protected]> writes:
>
>> E-p-m has never cared about paragraphs and neither has s-p-m or C-M-f or
>> many delimiter-based tools.  If you want all these things to stop
>> working across paragraphs, you should probably open a new discussion for
>> that.
>
> Paragraphs was just an example. My point is - major mode needs to decide
> such things. And fields often serve different purposes, so, IMHO, they
> are not the best vehicle to decide about bracket balancing.

What purposes do fields often serve?  I've seen them in comint-based
shells, widgets, etc.  They don't "decide" about bracket in the same way
that don't don't "decide" about movement.  This is just about isolating
operation of certain features (delimiter balancing, movement, etc) to a
given region.  The uses I've seen of fields all match perfectly.

If you'd rather make a complicated setting of electric-pair-skip-self
and electric-pair-inhibit-predicate etc in your major mode (like c-mode
infamously did and c-ts-mode fortunately didn't), you can.  I just
happen to think that setting a continugous 'field' property in your text
source blocks is a nice thing to do for your users.  But I don't use
much org.

João
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.