[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: M-% in macro
From: |
Drew Adams |
Subject: |
RE: M-% in macro |
Date: |
Mon, 30 Jan 2012 10:41:12 -0800 |
> For some reasons, I've to perform every day a series of
> search/replace on a
> auto generated text file. I've no possibility to access the code that
> generate that file to correct the mistakes. So, what I did is
> a macro in emacs that performs those search/replace all, that is
> with a "!" as last input of each search/replace command. My problem
> is that if there is no occurrence of one specific search that might
> appear on the next day, the "!" is understood as a typed character
> and not anymore as "replace all" and hence is inserted in the text,
> which is an annoyance. Does anyone have a idea on how I could
> avoid that problem. Thanks. DA
Sounds like you do not really want/need a query-replace dialog. See command
`replace-string'.
If you want to use Lisp instead of a keyboard macro for this, then see the note
in the `replace-string' doc string about what to use in Lisp.
- M-% in macro, Daniel Aronovitch, 2012/01/30
- RE: M-% in macro,
Drew Adams <=