From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Word Delimited Query Replace Date: Sat, 18 Oct 2008 15:21:58 -0400 Message-ID: References: <878wsl27pv.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1224357953 23739 80.91.229.12 (18 Oct 2008 19:25:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Oct 2008 19:25:53 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 18 21:26:51 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KrHPI-0005V1-3f for ged-emacs-devel@m.gmane.org; Sat, 18 Oct 2008 21:24:12 +0200 Original-Received: from localhost ([127.0.0.1]:34045 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KrHOC-00069H-Ua for ged-emacs-devel@m.gmane.org; Sat, 18 Oct 2008 15:23:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KrHND-0005ly-9o for emacs-devel@gnu.org; Sat, 18 Oct 2008 15:22:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KrHNB-0005ky-Ak for emacs-devel@gnu.org; Sat, 18 Oct 2008 15:22:02 -0400 Original-Received: from [199.232.76.173] (port=45852 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KrHNB-0005kr-2R for emacs-devel@gnu.org; Sat, 18 Oct 2008 15:22:01 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:52858) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KrHNA-00036n-Sz for emacs-devel@gnu.org; Sat, 18 Oct 2008 15:22:01 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsQEACXU+UhMCpQ6/2dsb2JhbACBcr8hg2yBCQ X-IronPort-AV: E=Sophos;i="4.33,440,1220241600"; d="scan'208";a="28555749" Original-Received: from 76-10-148-58.dsl.teksavvy.com (HELO ceviche.home) ([76.10.148.58]) by ironport2-out.teksavvy.com with ESMTP; 18 Oct 2008 15:22:00 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id CBF27B4111; Sat, 18 Oct 2008 15:21:58 -0400 (EDT) In-Reply-To: <878wsl27pv.fsf@jurta.org> (Juri Linkov's message of "Sat, 18 Oct 2008 19:23:09 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:104603 Archived-At: > BTW, I discovered a UI problem: to prepare the patch it was necessary > to rename the string "default" but not its plural form "defaults" in > read-regexp. So I selected the region around the body of read-regexp > and typed `C-s default C-u M-%'. The C-u prefix argument of query-replace > means to replace only matches surrounded by word boundaries, but while > implementing isearch-query-replace a few years ago we missed this case, > so currently isearch-query-replace just ignores it. IIUC the right way to do it is to use M-s w during the search to toggle isearch-word, after which M-% should DTRT (just like M-% in regexp isearch requests a query-replace-regexp). Also, are you sure your patch works? As far as I can tell, C-u currently leaves isearch, and I don't see anything in your patch that would change it. Stefan