GNU bug report logs - #77942
31.0.50; replace-region-contents gets stuck

Previous Next

Package: emacs;

Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Date: Sun, 20 Apr 2025 15:30:07 UTC

Severity: normal

Found in version 31.0.50

Full log


View this message in rfc822 format

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, 77942 <at> debbugs.gnu.org
Subject: bug#77942: 31.0.50; replace-region-contents gets stuck
Date: Tue, 22 Apr 2025 05:48:14 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> Gerd, IIUC you're trying to use this to benchmark the charpos->bytepos
> code, in which case you should be better served by a call where the text
> and its replacement are of fairly similar size.

That's right, it's for a bencnmark that helps me to get an impression if
avoiding the binary search in the charpos -> bytepos case is worth it.
Now that I know what replace-region-contents does, that's no problem.

But honestly, what the heck? Does someone know what this diffing is
about in the first place? I mean, that replacing a region takes O(ND) is
not something that I would have thought possible. 





This bug report was last modified 56 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.