Suppose we start with the following
Adam ate an apple.
Adam ate an apple.
Adam ate an apple.
Adam ate an apple.
Adam ate an apple.
I want to replace Adam
with Bob
, Chris
, and David
. So I want to do it such that I call a query-replace
-like function, search for Adam
and then cycle through the results specifying what to replace it by.
I am guessing there are three possible answers here:
- Write a function to do it, which I haven't tried.
- There is a way to do it using
query-replace
-like function which is what I am looking for. - I realize that I could do
C-r
duringquery-replace
, but I was wondering if there was a way to avoid that.