I want to interactively search and replace in all (or, preferably, a regexp subset of) my buffers (not files).
- Being a pack-rat sort of guy, I never delete my buffers until I'm sure I don't need them anymore (e.g. new project), or until the system crashes and I lose them. So I know that all the files I've modified (the targets of the search and replace) are in a buffer somewhere.
- The files are strewn all over creation so I can't use
- There are 10k files in scope, so I'd prefer to avoid file-based operations (though I've already wasted so much time on this I've eclipsed the amount of time I would have saved not using the file-based approach).
What I'm doing now
Right now I'm using
multi-occur-in-matching-buffers and repeating a query replace for each matching file.
I'm told Icicles will do this, but reading the manual, I can't make heads or tails of how to do it. (I used
M-99 M-x icicle-search; I get prompted for a "context", which I can't find a definition for in the manual and furnishes as a completion a list of previous mini-buffer entries, which doesn't make sense to me.) Icicles is far more than I need, but if I have to use it, I will.
Things I've tried
- I tried
tags-query-replacebut it doesn't work; I always get zero matches, even though it ends bringing up a buffer with a match in plain sight.
- I've read the FAQ (see responses above).
I may end up having to use file-based operations (which are annoying because I have to find and reload each file manually)
Since Icicles supposedly does what I want I thought I'd throw the question out. The other option is to use the Refactor facility in our IDE but that wouldn't be Emacs!! ❤