From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas =?iso-8859-1?q?R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: Interative batch query-replace question Date: Thu, 29 Nov 2007 07:54:34 +0100 Message-ID: <200711290754.35191.andreas.roehler@online.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1196319331 19941 80.91.229.12 (29 Nov 2007 06:55:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Nov 2007 06:55:31 +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 07:55:40 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 1IxdJB-0007Kt-Sh for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Nov 2007 07:55:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IxdIw-0007AO-H2 for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Nov 2007 01:55:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IxdIR-0006tj-Pb for help-gnu-emacs@gnu.org; Thu, 29 Nov 2007 01:54:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IxdIN-0006pV-Sm for help-gnu-emacs@gnu.org; Thu, 29 Nov 2007 01:54:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IxdIN-0006p9-JC for help-gnu-emacs@gnu.org; Thu, 29 Nov 2007 01:54:47 -0500 Original-Received: from moutng.kundenserver.de ([212.227.126.186]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IxdIM-0001ay-Sh for help-gnu-emacs@gnu.org; Thu, 29 Nov 2007 01:54:47 -0500 Original-Received: from noname (p54BE84AB.dip0.t-ipconnect.de [84.190.132.171]) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis) id 0ML2xA-1IxdIL3ZjE-0006ZX; Thu, 29 Nov 2007 07:54:46 +0100 User-Agent: KMail/1.9.5 In-Reply-To: Content-Disposition: inline X-Provags-ID: V01U2FsdGVkX18FF/cg6vb63KcRRNhFjMjIMyPS+sd9rXvTkiE NqXhPbLo7SOAEFzJy9vO6+8z1ybpp0qVDSJ9M4nj6Y7BgYk0lq E8HdHmI2EaHAis3NPVIDw== X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) 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:49674 Archived-At: Am Donnerstag, 29. November 2007 04:08 schrieb Ke Lu: > 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. > _______________________________________________ If it's enough to replace one by one, then should help always starting from the beginning. Introduce (goto-char (point-min))=20 before each loop Andreas R=F6hler