From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ke Lu Newsgroups: gmane.emacs.help Subject: Re: Interative batch query-replace question Date: Thu, 29 Nov 2007 19:18:44 +0900 Organization: Bentium Ltd. (CN99) Message-ID: 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 1196332840 26960 80.91.229.12 (29 Nov 2007 10:40:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Nov 2007 10:40:40 +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 11:40:49 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 1Ixgp7-0005ZN-5b for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Nov 2007 11:40:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ixgor-0003Ne-BR for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Nov 2007 05:40:33 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!news.cn99.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 51 Original-NNTP-Posting-Host: softbank218118058050.bbtec.net Original-X-Trace: news.cn99.com 1196335859 11096 218.118.58.50 (29 Nov 2007 11:30:59 GMT) Original-X-Complaints-To: usenet@news.cn99.com Original-NNTP-Posting-Date: Thu, 29 Nov 2007 11:30:59 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:BOO8a/zpzkRLsPuleHCLnwfMB5U= Original-Xref: shelby.stanford.edu gnu.emacs.help:154250 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:49678 Archived-At: 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: > Yes,Only the first one is executed. > > Andreas Röhler writes: > >> Am Donnerstag, 29. November 2007 06:56 schrieb Ke Lu: >>> Sorry, I forgot to move point to the begining of buffer, >>> It is ok now. >>> >>> But dired-do-query-replace-regexp still have some peoblem. >>> My function looks like: >>> (defadvice query-replace-regexp (before >>> move-start-after-query-replace-regexp activate) >>> (goto-char (point-min))) >>> >>> (defun batch-query-replace-regexp() >>> (interactive) >>> (switch-to-buffer "*Find*") >>> (dired-do-query-replace-regexp "jp\\.co" "jp.co2") >>> (switch-to-buffer "*Find*") >>> (dired-do-query-replace-regexp "java" "java2") >>> ) >>> >>> But the second one can't be executed and there is not any >>> error message. >>> What is the reason? >>> >>> Ke Lu writes: >>> > I want to do a Interative batch query-replace which looks like: >>> > (defun a-batch-query-relace() >>> > (interactive) >>> > (query-replace "jp.co" "jp.co2") >>> > (query-replace "java" "java2") >>> > ..... >>> > ) >>> > But only first query-replace be excuted,I would like to know why >>> > and how to solve it. >>> >>> _______________________________________________ >> >> Same problem?