Permanent query-replace-regexp bar reddit / emacs ---------------------------------------------------------------------- [deleted] · 2022-06-11 20:53 [deleted] ---------------------------------------------------------------------- hmelman · 2022-06-12 01:34 Maybe this? https://github.com/benma/visual-regexp.el ---------------------------------------------------------------------- 00-11 · 2022-06-12 02:17 Others will provide answers that are likely to do more what you have in mind. I'll just mention that after you've entered the regexp you can use `M-p` to retrieve it at the prompt for the replacement. And it remains in your input history (as does the replacement pattern) for subsequent query-replacing. `M-p` and `M-n` cycle backward and forward in your minibuffer input history. And you can use `M-r` and `M-s` to get to previous inputs by matching a regexp. ---------------------------------------------------------------------- 7890yuiop · 2022-06-12 04:19 Which version of Emacs are you using? At minimum (based on versions I have installed), what you describe is not true of version 26.3 and later. ---------------------------------------------------------------------- [deleted] · 2022-06-12 05:38 [deleted] ---------------------------------------------------------------------- E3D3redit · 2022-06-12 18:16 Maybe you like Karthinks's article [Bridging Islands in Emacs: re-builder and query-replace- regexp](https://karthinks.com/software/bridging-islands-in-emacs-1/) ---------------------------------------------------------------------- [deleted] · 2022-06-12 19:51 [deleted]