|
From: | Nascif Abousalh-Neto |
Subject: | RE: [h-e-w] Re: Global search/replace across files? |
Date: | Thu, 20 Jun 2002 19:03:20 -0400 |
Here is a very naive suggestion to create a macro that operates only on marked files:
start the macro with a search for "* " (the marker used by dired to indicate marked files).
- Nascif
> -----Original Message-----
> From: Stephen Leake [mailto:address@hidden]
> Sent: Thursday, June 20, 2002 4:58 PM
> To: Raymond Zeitler
> Cc: address@hidden
> Subject: Re: [h-e-w] Re: Global search/replace across files?
>
>
> "Raymond Zeitler" <address@hidden> writes:
>
> > Maybe I'm doing something wrong, but after I mark the 100
> or so files
> > I want to perform a search and replace on, and press Q, and
> enter the
> > search and replacement regexps, I'm forced to press ! about
> 100 times
> > to do the replacement on all the files. I tried using a prefix
> > argument C-u in front of Q, but it then it replaces 0 occurrences.
>
> Yes, that's how it works.
>
> > This is Emacs 21.2 on Win2K.
> >
> > Shouldn't Q (dired-do-query-replace-regexp) have a "no ask" option?
>
> Yes, it should. I'll admit I haven't looked for one; try reading the
> info about dired-do-query-replace-regexp.
>
> > Shouldn't the mode line indicate how many files are marked?
>
> Well, that might be nice.
>
> > Right now, it's better for me to use my file manager to drag the
> > files I want to change into Emacs and then write a macro to iterate
> > each file, saving it in the process.
>
> I tend to record a macro in the dired buffer; the macro starts with
> <ret> to open the file, and ends with <next> to position on the next
> file.
>
> > Incidentally, why isn't there something like a
> > dired-find-marked-files command? And if "Most commands operate on
> > the marked files..." why doesn't "f" (dired-find-file)? Can't I even
> > visit the marked files?
>
> Good question.
>
> > Do I really have to use Explorer to visit them?
>
> Hope not :).
>
> > I'll stop now before my ranting causes you to shoot me. :)
>
> Well, instead of resorting to violence, I'll point out that Emacs is
> open source, so _you_ can fix these problems!
>
> --
> -- Stephe
>
>
>
[Prev in Thread] | Current Thread | [Next in Thread] |