When using M-x visual-replace, pressing C-y does not paste what was previously copied (or cut). Instead, it seems to paste whatever the current point rests on. I was told that this is how M-x isearch used to behave. However, considering that
-
this behavior was changed over a decade ago (see line 2755 in Emacs News)
-
M-x replace-string and M-x query-replace-string never used to behave like that
would it be possible to make C-y behave "as expected"?
edit: if anybody else encounters this issue, you can "fix" it by for example putting the following underneath :config in your `(use-package visual-replace ...)
(define-key visual-replace-mode-map [remap yank] nil)
(define-key visual-replace-mode-map [remap yank-pop] nil)
When using
M-x visual-replace, pressingC-ydoes not paste what was previously copied (or cut). Instead, it seems to paste whatever the current point rests on. I was told that this is howM-x isearchused to behave. However, considering thatthis behavior was changed over a decade ago (see line 2755 in Emacs News)
M-x replace-stringandM-x query-replace-stringnever used to behave like thatwould it be possible to make
C-ybehave "as expected"?edit: if anybody else encounters this issue, you can "fix" it by for example putting the following underneath
:configin your `(use-package visual-replace ...)