[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Interative batch query-replace question
From: |
Ke Lu |
Subject: |
Re: Interative batch query-replace question |
Date: |
Fri, 30 Nov 2007 18:25:03 +0900 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
I want do it only once.
I just want to call dired-do-query-replace-regexp
many times in a function.
The thing is the only the first call is excuted,
Don't you feel Is it strange?
Or it is the bug of dired?
Andreas Röhler <andreas.roehler@online.de> writes:
> Am Freitag, 30. November 2007 02:58 schrieb Ke Lu:
>> jp\\.co
>
> To question is: Must you do that just once and only
> renaming is at stake? If yes, I'd choose `wdired'.
>
> Should you have the same renamings to perform
> repeatedly and/or other tasks than renaming with this
> files--backups, contents changes or whatever--I would
> write a skript aside from dired.
>
> BTW the *Find*" buffer usually is
> write-protected. Editing them looks special for me.
>
> To get the appropriate files in directory I'd choose
> something like
>
> (let ((files (directory-files (expand-file-name (substitute-in-file-name
> dir))
> t "jp\\.co$")))
> (while files
> (let ((file (car files)))
> (when (file-exists-p file)
>
> DO SOMETHING
> (setq files (cdr files))))))
>
> ;;;;;;;
>
> For DO SOMETHING
>
> you could proceed
>
> (if (string-match ...
>
> ;; your interactive form
> (y-or-n-p
> (rename-file ...
>
> DO MORE THINGS
>
> ;;;;;;;;;;;
>
> HTH
>
> Andreas Röhler
- Interative batch query-replace question, Ke Lu, 2007/11/28
- Re: Interative batch query-replace question, Ke Lu, 2007/11/29
- Re: Interative batch query-replace question, Andreas Röhler, 2007/11/29
- Message not available
- Message not available
- Re: Interative batch query-replace question, Ke Lu, 2007/11/29
- Re: Interative batch query-replace question, Andreas Röhler, 2007/11/30
- Message not available
- Re: Interative batch query-replace question,
Ke Lu <=
- Re: Interative batch query-replace question, Joel J. Adamson, 2007/11/30
- Re: Interative batch query-replace question, Andreas Röhler, 2007/11/30
- Message not available
- Re: Interative batch query-replace question, Ke Lu, 2007/11/30
Re: Interative batch query-replace question, Andreas Röhler, 2007/11/29