GNU bug report logs - #31492
26.1; query-replace-regexp undo fails in regexps w/o printable chars

Previous Next

Package: emacs;

Reported by: Tino Calancha <tino.calancha <at> gmail.com>

Date: Fri, 18 May 2018 13:28:02 UTC

Severity: normal

Found in version 26.1

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Tino Calancha <tino.calancha <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 31492 <at> debbugs.gnu.org, Tino Calancha <tino.calancha <at> gmail.com>
Subject: bug#31492: 26.1; query-replace-regexp undo fails in regexps w/o printable chars
Date: Sat, 19 May 2018 10:46:10 +0900 (JST)

On Fri, 18 May 2018, Eli Zaretskii wrote:

>> From: Tino Calancha <tino.calancha <at> gmail.com>
>> Date: Fri, 18 May 2018 23:22:13 +0900 (JST)
>> cc: Tino Calancha <tino.calancha <at> gmail.com>, 31492 <at> debbugs.gnu.org
>>
>>>> emacs -Q
>>>>
>>>> < C-M-% \b RET foo RET TAB TAB TAB
>>>> U ; undo all replacements
>>>> ;; Nothing is undid :-(
>>>
>> '<' stands for `beginning-of-buffer'.
> Sorry, I'm still in the dark. Typing '<' inserts that character
Opps... Sorry!  That should read 'M-<'.
And the TAB's should read SPC.

The correct recipe is:

M-<
C-M-% \b RET foo RET SPC SPC
U
;; All 'foo' keep there :-(

This happen because the regexp "\b" has any printable character.
If we try instead:

M-<
C-M-% is\b RET foo RET SPC SPC
U
;; Now all 'foo' are gone :-)





This bug report was last modified 7 years and 4 days ago.

Previous Next


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