From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: query-replace on region highlights too much Date: Sun, 13 Feb 2005 09:50:00 +0900 Message-ID: References: <874qghv4q7.fsf@emptydomain.de> Reply-To: snogglethorpe@gmail.com, miles@gnu.org NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1108257043 29361 80.91.229.2 (13 Feb 2005 01:10:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 13 Feb 2005 01:10:43 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 13 02:10:42 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D08HR-0005OX-Bl for ged-emacs-devel@m.gmane.org; Sun, 13 Feb 2005 02:10:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D08Wf-0001xA-Rt for ged-emacs-devel@m.gmane.org; Sat, 12 Feb 2005 20:26:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D08V8-0001jU-PR for emacs-devel@gnu.org; Sat, 12 Feb 2005 20:24:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D08V5-0001iG-7r for emacs-devel@gnu.org; Sat, 12 Feb 2005 20:24:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D08UC-0001CW-3d for emacs-devel@gnu.org; Sat, 12 Feb 2005 20:23:44 -0500 Original-Received: from [64.233.184.199] (helo=wproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D07xZ-0001pO-Er for emacs-devel@gnu.org; Sat, 12 Feb 2005 19:50:01 -0500 Original-Received: by wproxy.gmail.com with SMTP id 40so464321wri for ; Sat, 12 Feb 2005 16:50:00 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=l6Hgvck5+nEbv0KbmXt/9o4TfPpDaduR2TzvlI3SPstpi7tTrflVl0bcsrKXmPYlVMqn2Wna5iAe/ATZyg9786e0aN3Pbhps/SNr/smGk0h49a1Y6hxS4AjGKRogKYfWbdVtXplCv+DJxkEnLR1C8Zql0ikTCR57wb12ZHv2Icg= Original-Received: by 10.54.59.18 with SMTP id h18mr159059wra; Sat, 12 Feb 2005 16:50:00 -0800 (PST) Original-Received: by 10.54.19.70 with HTTP; Sat, 12 Feb 2005 16:50:00 -0800 (PST) Original-To: =?ISO-8859-1?Q?Kai_Gro=DFjohann?= In-Reply-To: <874qghv4q7.fsf@emptydomain.de> 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 X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:33325 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:33325 On Sat, 12 Feb 2005 22:38:24 +0100, Kai Gro=DFjohann w= rote: > I mark a region, I invoke M-%. This will perform the query-replace on > the marked region only. (I forget whether that's always the case, or > whether I have turned on something to make it so. I think it works > like this because I use transient-mark-mode.) >=20 > The problem is that the highlighting of the search string is performed > in the whole buffer, not only in the region where replacing is going > to happen. Yes, I find that very disturbing as well. A particularly bad case is where you're replacing a very common string (like a small space) in a small region, in which case the bogus highlights can completely overwhelm the cursor display and region highlighting! Oh, also another problem with the "query-replace highlighting": The highlighting seems to be erased and re-done from scratch everytime you hit "y" to replace an instance, which can be very annoying. I suppose the intent of this is to keep any highlighting up-to-date in the face of buffer-modification, but it could be made much smarter (e.g., only "refresh" the buffer region actually modified by the last replacement). Thanks, -Miles --=20 Do not taunt Happy Fun Ball.