unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Bug/regression in regex-replace (was fix for bug#67124)
@ 2024-11-30  1:24 Campbell Barton
  2024-11-30  2:49 ` ideasman42
  2024-11-30  7:24 ` Eli Zaretskii
  0 siblings, 2 replies; 3+ messages in thread
From: Campbell Barton @ 2024-11-30  1:24 UTC (permalink / raw)
  To: emacs-devel

Hi, the commit 47b497b4dac91e5ea56102018223bdeb5e21a93b by Stefan 
Monnier (an alternate fix for bug#67124) has broken the evil-numbers 
package [0], causing it's tests to fail.

 From a user perspective:
`evil-numbers/dec-at-pt` on `0` to result in `1` instead of `-1`.

The change seems to be caused by (set-match-data ...)
using passing in a pair of identical points (a match with zero length), 
then a call to regex-replace to insert text into the empty match (the 
numbers "sign" in this case).

I'm not sure if this would be considered a bug, or if creating an empty 
group is considers incorrect use of the API, in that case - invalid 
input might raise an error instead of failing silently.

Whatever the case this used to work - and the commit doesn't indicate 
the change was intentional.

[0]: https://github.com/juliapath/evil-numbers





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-11-30  7:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-30  1:24 Bug/regression in regex-replace (was fix for bug#67124) Campbell Barton
2024-11-30  2:49 ` ideasman42
2024-11-30  7:24 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).