Skip to main content

Questions tagged [query-replace]

query-replace is a built-in Emacs command for interactively replacing one string with another in a buffer. query-replace-regexp does the same thing, but with support for matching regular expressions. Use this tag for both commands.

0 votes
1 answer
66 views

I'm trying to use query-replace in Emacs to replace a string with another string that has specific text properties. Specifically, in this example, I want to replace occurrences of "foo" with ...
Gabriele's user avatar
  • 1,720
0 votes
1 answer
108 views

I have this function: (defun my-replacements () (interactive) (query-replace "foo" "bar" nil (point-min) (point-max)) (query-replace "baz" "quz" nil (...
Gabriele's user avatar
  • 1,720
0 votes
1 answer
38 views

I'm trying to use query-replace with a prefix argument in superword mode. So for example, C-u M-% token RET token_drawer RET should not replace token where it appears in token_width. But query-...
Norman Ramsey's user avatar
0 votes
1 answer
118 views

When I run query-replace* commands if I type ? I get this explanation of the function's options: Type Space or ‘y’ to replace one match, Delete or ‘n’ to skip to next, RET or ‘q’ to exit, Period to ...
Gabriele's user avatar
  • 1,720
0 votes
1 answer
130 views

I am using combination of following solutions in order to find-and-replace matched text in all Python files: Using Emacs to recursively find and replace in text files not already open How can I ...
alper's user avatar
  • 1,570
1 vote
1 answer
237 views

I am using following solution (How do I add a keybinding to use during an interactive isearch, `C-s ...`) to move over symbols in the buffer, which iterates over the matching symbols: (define-key ...
alper's user avatar
  • 1,570
0 votes
1 answer
91 views

I would like to scan through a (latex) document and recursively delete -- WITH QUERY -- all consecutive, repeated words that need not be on the same line and/or the same case. Here is a simple ...
underflow's user avatar
  • 153
0 votes
0 answers
169 views

It seems promising to have a built-in function that performs this action: find and replace all matching text recursively, within your project. The problem is that it doesn't seem consistent. I am ...
mcp's user avatar
  • 626

15 30 50 per page
1
2 3 4 5 6