Re: electric-pair mode, comint, and text attribution
Andrew Hyatt <[email protected]>
| Newsgroups | gmane.emacs.devel |
|---|---|
| Message-ID | <[email protected]> |
Augusto Stoffel <[email protected]> writes: > Related, if not exactly the same issue: bug#50236 Thanks for finding that. I actually think it's the same issue, and the same field solution I mentioned have been put forward there. I propose we just make this a duplicate of that one, and I can then just send a patch with the field fix (or, the comment-syntax fix if we decide that is better) there. If there's no objections, I'll do this tomorrow. > > On Fri, 3 Jul 2026, Andrew Hyatt wrote: > >> Stefan Monnier via "Emacs development discussions." <[email protected]> writes: >> >> Perhaps this is just a bug and I should report it as a bug, but I think if I did so, it'd >> probably be closed as working as intended. In a way, it is. Electric pair mode is >> doing what is says it would do. However, I think it'd be better if comint-mode and >> similar modes would track, probably with overlays, which parts of the buffer are >> definitely known to be generated, and those parts are excluded from electric-pair >> mode. >> >> I think this is indeed just a bug (or a missing feature) in electric-pair-mode. >> >> The bug might arguably be in the corresponding modes for failing to tell >> `electric-pair-mode` how it should behave. Tho it may also be a bug in >> `electric-pair-mode` for failing to offer appropriate hooks. I recommend you `M-x >> report-emacs-bug`. >> >> I'll do that. However, I think the design decisions are interesting, and spill beyond just >> electric-pair-mode for the reasons I've mentioned above; I'd rather think about a fix that >> solves this in a way that enhances Emacs more generally. I'm happy to write a more >> specific proposal if there's interest in the problem, and I'll mention that in the bug report. >> >> = Stefan