bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21684: 25.0.50; undo in query-replace w/o exit


From: Juri Linkov
Subject: bug#21684: 25.0.50; undo in query-replace w/o exit
Date: Sun, 18 Oct 2015 00:49:46 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu)

> See new patch (replace-2.patch): AFAICS is working as i wanted.
> Please try it and feel free to give me any comments if you
> find some issues to fix/improve.

Thank you, your patch is working well.  One issue to improve I noticed that
when a previous replacement is skipped with "n" then undo "U" acts exactly
as backup "^" by going to the previous place, and doing no undo actually.
Maybe better would be for undo "U" to only undo and skip non-replacement
entries in the stack?  (Implementation-wise this means looping until
finding a previous non-replacement entry in the stack).

A minor comment is that to save cons cells you could just put both new
elements shallow as elements 3 and 4 in the stack instead of adding
a list of them.

Another minor suggestions is for better names you could rename
the prefix -solved-regexp to -replaced, i.e. replace
search-string-solved-regexp, next-replacement-solved-regexp with
search-string-replaced, next-replacement-replaced.

Also we need this feature to be documented in etc/NEWS.

Have you already signed FSF copyright assignment papers?

Your patch for bug#21663 is short enough to be installed without the
copyright paperwork, but your changes for bug#21684 require it.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]