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, João Távora wrote:

> But _if_ you wanted to do that, you'd be wrong.  You wouldn't need to
> "fill the whole buffer with field [properties]".  A field is just a
> region of text with the same ‘field’ property, so if you set a single
> char's worth of "field=blargh" in the '*' (where you already set an
> overlay anyway aparently) you have the needed demarcations.  Delete that
> heading and you magically merge the two fields for free.

What if you change the '*' at BOL to ' *' or '*x' or whatever makes it
stop being a heading delimiter?

What you're arguing for boils down to precomputing all possible e-p-m
boundaries and encoding the result in field properties.  I really don't
get why you think that's better than moving the field search logic to a
new function and making the e-p-m boundary search function customizable,
as in

  (defun e-p-m-self-insert-function ()
    (let ((bounds (funcall e-p-m-bounds-function)))
      (with-restriction (car bound) (cdr bounds)
        <old definition of e-p-m-self-insert-function>)))

This is dead simple.

> Play around with field-beginning and field-end to see what I mean.
> These functions are in C and they are pretty fast.
>
>> (Here, we do not care about previous section brackets)
>
> Not necessarily.  Currently org matches across different headings and I
> haven't seen anyone complaining.  Personally, it's only inside code
> blocks I think it makes a little more sense to track balance
> independently.
>
>> #+begin_src emacs-lisp
>> (message "And here we can Elisp code, that should be isolated")
>> #+end_src
>
> Only here would I do the courtesy of marking that a field, because it
> comes from another language completely.  You already set a 'src-block'
> to 't' property there.  I'd put a 'field' as well, and call it a day.
> It's probably a sub-1-loc patch which I would show if I somehow dared to
> navigate that petaline code base, but surely you can.

The department of redundancy department would like that a lot.

> 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.