[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Interative batch query-replace question
From: |
Andreas Röhler |
Subject: |
Re: Interative batch query-replace question |
Date: |
Fri, 30 Nov 2007 09:08:55 +0100 |
User-agent: |
KMail/1.9.5 |
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 <=
- Message not available
- Re: Interative batch query-replace question, Ke Lu, 2007/11/30
- 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