help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

weird dired-do-query-replace-regexp problem: cannot run twice


From: address@hidden
Subject: weird dired-do-query-replace-regexp problem: cannot run twice
Date: 6 Feb 2007 07:06:34 -0800
User-agent: G2/1.0

Hi,
  I have the following code where doing a single call to dired-do-
query-replace-regexp works fine, but if I do two, only the first
works. If I change the order of the call, only the (new) first works,
so the calls are individually fine:

The code:
=============================================
(defun seqsee-replace (what-to-replace replace-with)
  (interactive (list (read-string "Replace what? " nil)
                     (read-string "Replace with: " nil)))
  (replace-in-files-in-directory "d:/Seqsee/t/" what-to-replace
replace-with)
  (replace-in-files-in-directory "d:/Seqsee/lib/" what-to-replace
replace-with)
  )

(defun replace-in-files-in-directory (dir what-to-replace replace-
with)
  (find-file dir)
  (setq default-case-fold-search nil)
  (setq case-fold-search nil)
  (dired-mark-files-regexp "\\.pl$")
  (dired-mark-files-regexp "\\.pm$")
  (dired-mark-files-regexp "\\.t$")
  (dired-do-query-replace-regexp what-to-replace replace-with)
  (setq default-case-fold-search t))
==============================================

After successfully doing the first replace-in-files-in-directory,
seqsee-replace silently returns. *message* buffer does not have any
mention of the second directory whatsoever.

I hope somebody knows what is going on here...

Thanks much,
  abhijit



reply via email to

[Prev in Thread] Current Thread [Next in Thread]