benma / visual-regexp.el

A regexp/replace command for Emacs with interactive visual feedback
400 stars 29 forks source link

C-x C-s doesn't save inside of vr/isearch #56

Open asmeurer opened 4 years ago

asmeurer commented 4 years ago

I have C-s and C-r set to the vr/isearch (actually using visual-regexp-steroids, but visual-regexp is the same). In normal isearch, if I type C-x C-s, it exits isearch and saves the buffer. In vr/isearch, it exits the search, but doesn't save the buffer.

I run into this issue literally dozens of times a day where I try to save right after doing a search and it doesn't work. About half the time I notice it and have to keep mashing C-x C-s, and about half the time I don't and only realize later that I didn't actually save my work to disk.

asmeurer commented 4 years ago

Apparently vr/isearch-forward is only part of visual-regexp-steroids? I had tried disabling it and using only visual-regexp and thought I had reproduced it here as well. Anyway, feel free to move the issue if isn't not relevant for this repo.

benma commented 4 years ago

Thanks for the report. Would you be inclined to make a PR fixing this issue?

asmeurer commented 4 years ago

I have no idea how to fix it. I looked at the code to see what vr/isearch is doing. I guess it's just an interactive function that mimics isearch? How would one modify the keybindings for it?

I think ideally vr/isearch would somehow wrap the normal isearch rather than being an interactive function, so that you get all the features of it. But I don't know how that would work either. (and my elisp is not very great)