From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Hansen Newsgroups: gmane.emacs.help Subject: Re: restricting query-replace to region in emacs lisp script Date: Wed, 24 Jan 2007 15:37:49 +0100 Organization: disorganized Message-ID: <87irewebia.fsf@localhorst.mine.nu> References: <1169644176.300408.69470@v33g2000cwv.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1169649579 21307 80.91.229.12 (24 Jan 2007 14:39:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 24 Jan 2007 14:39:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 24 15:39:28 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 1H9jHa-00081y-Vd for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Jan 2007 15:39:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9jHa-0007QU-B3 for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Jan 2007 09:39:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9jHO-0007QF-SS for help-gnu-emacs@gnu.org; Wed, 24 Jan 2007 09:39:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9jHM-0007Q3-ID for help-gnu-emacs@gnu.org; Wed, 24 Jan 2007 09:39:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9jHM-0007Q0-CN for help-gnu-emacs@gnu.org; Wed, 24 Jan 2007 09:39:12 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H9jHM-0000N7-62 for help-gnu-emacs@gnu.org; Wed, 24 Jan 2007 09:39:12 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1H9jH3-0002hb-ED for help-gnu-emacs@gnu.org; Wed, 24 Jan 2007 15:38:53 +0100 Original-Received: from e178000106.adsl.alicedsl.de ([85.178.0.106]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 24 Jan 2007 15:38:53 +0100 Original-Received: from david.hansen by e178000106.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 24 Jan 2007 15:38:53 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 12 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: e178000106.adsl.alicedsl.de Mail-Copies-To: nobody User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux) Cancel-Lock: sha1:6BKCErOQx2trFc7WT46Ie9Byyp0= X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:40586 Archived-At: On 24 Jan 2007 05:09:36 -0800 conscious wrote: > I am writing a lisp routine to implement a sequence of query-replace > operations on a region. Before I run the query-replace I define a > region, e.g. by mark-paragraph. However, other than in normal > interactive operation in transient-mark-mode, the query-replace does > not restrict the query-replace to the marked region. Does anybody know > how to restrict the region for query-replacing with a lisp-routine? `narrow-to-region' David