From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jadamson@partners.org (Joel J. Adamson) Newsgroups: gmane.emacs.help Subject: Re: Interative batch query-replace question Date: Thu, 29 Nov 2007 16:16:15 -0500 Organization: I need to put my ORGANIZATION here. Message-ID: <878x4gkb1c.fsf@W0053328.mgh.harvard.edu> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1196372528 11709 80.91.229.12 (29 Nov 2007 21:42:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Nov 2007 21:42:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 29 22:42:16 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ixr8z-00081N-A9 for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Nov 2007 22:42:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ixr8j-00023s-KM for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Nov 2007 16:41:45 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news2.google.com!news.glorb.com!newspeer1.asbnva01.us.to.verio.net!news.harvard.edu!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-NNTP-Posting-Host: w0053328.mgh.harvard.edu Original-X-Trace: plato.harvard.edu 1196370975 30708 132.183.29.121 (29 Nov 2007 21:16:15 GMT) Original-X-Complaints-To: news@plato.harvard.edu Original-NNTP-Posting-Date: Thu, 29 Nov 2007 21:16:15 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:2wTg4Av3aJBMYT2rSLYtD8IV0fs= Original-Xref: shelby.stanford.edu gnu.emacs.help:154271 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:49698 Archived-At: Andreas Röhler writes: > If you could give a short description of your task, > that may help to find the code. > > AFAIK `dired-' is designed to be called from the > dired-buffer. If you do query-replace from a program, > you probably should use other functions. > > > Andreas Röhler > >> The problem is: >> (defun batch-query-replace-regexp() >> (interactive) >> (switch-to-buffer "*Find*") >> (dired-do-query-replace-regexp "jp\\.co" "jp.co2") >> ->can't reach here (switch-to-buffer "*Find*") >> (dired-do-query-replace-regexp "java" "java2") >> ) >> >> Ke Lu writes: I'm coming in late on this convo, but AFAIK dired and ibuffer do their own "batch" query-replace-regexp functions. Joel -- Joel J. Adamson Biostatistician Pediatric Psychopharmacology Research Unit Massachusetts General Hospital Boston, MA 02114 (617) 643-1432 (303) 880-3109