From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.bugs Subject: bug#59918: 29.0.60; query-replace in the minibuffer lazy-highlights original buffer Date: Sun, 11 Dec 2022 12:40:00 +0100 Message-ID: <87edt6419r.fsf@gmail.com> References: <86y1rhhvsi.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39596"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 59918@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 11 12:41:11 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p4Khi-000A8f-2D for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Dec 2022 12:41:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4Khc-0006FT-EQ; Sun, 11 Dec 2022 06:41:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4Khb-0006FL-1P for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2022 06:41:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4Kha-0002wl-Ng for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2022 06:41:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p4Kha-0000za-Jf for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2022 06:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Dec 2022 11:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59918 X-GNU-PR-Package: emacs Original-Received: via spool by 59918-submit@debbugs.gnu.org id=B59918.16707588113792 (code B ref 59918); Sun, 11 Dec 2022 11:41:02 +0000 Original-Received: (at 59918) by debbugs.gnu.org; 11 Dec 2022 11:40:11 +0000 Original-Received: from localhost ([127.0.0.1]:46352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4Kgk-0000z6-No for submit@debbugs.gnu.org; Sun, 11 Dec 2022 06:40:10 -0500 Original-Received: from mail-ej1-f49.google.com ([209.85.218.49]:44727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4Kgj-0000yv-45 for 59918@debbugs.gnu.org; Sun, 11 Dec 2022 06:40:09 -0500 Original-Received: by mail-ej1-f49.google.com with SMTP id x22so21501901ejs.11 for <59918@debbugs.gnu.org>; Sun, 11 Dec 2022 03:40:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=vLCPWy0mlk5MY3EAhkM9RFgOkjfoCzPYZgH7hViXUTU=; b=GVD2s95qrzvM/GHwCftX2E+gahgst+HH4THq1/MK6fCzkUfKHwHpNEIWUdJ/h5X0+3 DepGhkwDeiQ661Hkhcz2hR6D3dHwMKb/t4wGwe5ATR6JCIhO+Sxt5IbEljpUrpyvc52v CKLtSRr1Ph5YaTgVUZ9mYWWF3PWyAUnYxGU/Gxol8j+ERXe55e8cRCvNDaADwupwa7mo QtJMerdcC5+6zzJaGXhi2z46BpkYmvobXqFUeShiV88/MrIoMuOuZud41zl6l/tLMY/o sm/W55VWl8Nh+Cjh73oQT1ru/56xUu5SipOL8T8GouTp2xVeQX6exxpBjY+b+21dlbGG 8F1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=vLCPWy0mlk5MY3EAhkM9RFgOkjfoCzPYZgH7hViXUTU=; b=oHUQKkjosTnHw0I/c4UHl9NpdOtKXeVaN1wBZlGHorkpW1yB5yDasNqZ9QwljJLXdw Wqpb8T80u1Qu94ZP1Iedz3hLbUIz9LphSHsGt4mzevP261WI2kFv62wH+tLmYHtM+c+z l9SJsQQkGwmxkLG/DVVjSNQqKs45JQhj7Fr/iG5JqFCVsKXMo36HovrPTgH5d6AasVJe t18K5WY/qPAXaqlh8iL/t2JslvM5GqmKEos4XGMMp1TjXNStFeU0AxdAEAUVC5go50Na 2n1fxXNEiWZ36ZCTqT5TomENKgs9dUeMs6bbGpafxRusg9W7CLq+MILJeh7OKbaeFhvo QBHw== X-Gm-Message-State: ANoB5plBRYnYuyjhjtdOa7WcfEZslNBVtSozWysLNRBWY3LBr7l1nSRt g0oy1NZErEAc5T4K4YJM0zxbpFz7Y85utw== X-Google-Smtp-Source: AA0mqf5MUtelLdXmvhLNQkLoMqwJm7kBF5C0sTVwiGf7NUdgx6baHWy733iAYyRE67u1OtrekCIljg== X-Received: by 2002:a17:906:f6d7:b0:7c0:bf7c:19f4 with SMTP id jo23-20020a170906f6d700b007c0bf7c19f4mr10630030ejb.74.1670758802938; Sun, 11 Dec 2022 03:40:02 -0800 (PST) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::a4bf]) by smtp.gmail.com with ESMTPSA id g23-20020a170906595700b007c0bb571da5sm2013906ejr.41.2022.12.11.03.40.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Dec 2022 03:40:02 -0800 (PST) In-Reply-To: <86y1rhhvsi.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 09 Dec 2022 09:42:49 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:250599 Archived-At: On Fri, 9 Dec 2022 at 09:42, Juri Linkov wrote: > X-Debbugs-Cc: Augusto Stoffel > > 0. emacs -Q > 1. (setq enable-recursive-minibuffers t) > 1. M-! is C-a > 2. M-% is > > Matches are lazy-highlighted in the original buffer, > but the replacement is going to be used to replace > matches in the minibuffer. I guess this happens because minibuffer-selected-window returns the original buffer. I think this patch does the trick? --8<---------------cut here---------------start------------->8--- modified lisp/isearch.el @@ -4435,7 +4435,9 @@ minibuffer-lazy-highlight-setup highlighting. LAX-WHITESPACE: The value of `isearch-lax-whitespace' and `isearch-regexp-lax-whitespace' to use for lazy highlighting." - (if (not highlight) + (if (not (and highlight + (eq (current-buffer) (window-buffer + (minibuffer-selected-window))))) #'ignore (let ((unwind (make-symbol "minibuffer-lazy-highlight--unwind")) (after-change (make-symbol "minibuffer-lazy-highlight--after-change")) --8<---------------cut here---------------end--------------->8---