* M-% in macro
@ 2012-01-30 9:51 Daniel Aronovitch
2012-01-30 18:41 ` Drew Adams
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Aronovitch @ 2012-01-30 9:51 UTC (permalink / raw)
To: Help-gnu-emacs
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
--
View this message in context: http://old.nabble.com/M---in-macro-tp33227962p33227962.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: M-% in macro
2012-01-30 9:51 M-% in macro Daniel Aronovitch
@ 2012-01-30 18:41 ` Drew Adams
0 siblings, 0 replies; 2+ messages in thread
From: Drew Adams @ 2012-01-30 18:41 UTC (permalink / raw)
To: 'Daniel Aronovitch', Help-gnu-emacs
> 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-30 18:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-30 9:51 M-% in macro Daniel Aronovitch
2012-01-30 18:41 ` Drew Adams
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.