From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59918: 29.0.60; query-replace in the minibuffer lazy-highlights original buffer Date: Mon, 12 Dec 2022 21:28:29 +0200 Message-ID: <838rjcqv4y.fsf@gnu.org> References: <86y1rhhvsi.fsf@mail.linkov.net> <87edt6419r.fsf@gmail.com> <864ju0r002.fsf@mail.linkov.net> <83iligqyva.fsf@gnu.org> <87o7s8o31r.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9861"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59918@debbugs.gnu.org, juri@linkov.net To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 12 20:29:28 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 1p4oUS-0002NN-4W for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Dec 2022 20:29:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4oU4-00082M-Sw; Mon, 12 Dec 2022 14:29: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 1p4oU2-000825-Nz for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 14:29:02 -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 1p4oU2-0004lt-Cl for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 14:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p4oU2-0002rP-7l for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 14:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Dec 2022 19:29: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.167087331610988 (code B ref 59918); Mon, 12 Dec 2022 19:29:02 +0000 Original-Received: (at 59918) by debbugs.gnu.org; 12 Dec 2022 19:28:36 +0000 Original-Received: from localhost ([127.0.0.1]:54864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4oTb-0002rA-JR for submit@debbugs.gnu.org; Mon, 12 Dec 2022 14:28:35 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4oTZ-0002r4-GV for 59918@debbugs.gnu.org; Mon, 12 Dec 2022 14:28:34 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4oTS-0004ha-Ua; Mon, 12 Dec 2022 14:28:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=+Be/jjL7Ca4Tu2Lll1PM4HcpeNh5Zh4LxaQojOfYgLk=; b=NmAZxQSWiv7/ 7mATKW1EHZwumK/1mYBOPMvLDYP5J41Uh7/HbK1emEFsb4rkeP1TVBrAnexCn2tDGQUuJSgo9bxzC 4p7jYawtcAHToXojuqPp5ypG0w2DXBIyLORWOVf0VERQ6SnxgwXSuPeYcnskYblVPTAprR5eIz42R hyuzsNvpXUuvGoC3QfDIHSyVKYUAelCoVHebO1Q6dpXSedM4UTo3VL5BEWzw2xqh0jGrONNAKibUO ePd7qJ1VZ1EDshdy1OMB5sAsGA2V98EYFduHI/ntZp57OKUQgdbH5daNBgQJiYpxD/8Z8PezOK2d0 SNw+WBnZoE28oZdbZfqT+Q==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4oTS-0001WX-CO; Mon, 12 Dec 2022 14:28:26 -0500 In-Reply-To: <87o7s8o31r.fsf@gmail.com> (message from Augusto Stoffel on Mon, 12 Dec 2022 20:05:52 +0100) 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:250747 Archived-At: > From: Augusto Stoffel > Cc: Juri Linkov , 59918@debbugs.gnu.org > Date: Mon, 12 Dec 2022 20:05:52 +0100 > > On Mon, 12 Dec 2022 at 20:07, Eli Zaretskii wrote: > > > I admit that I don't understand the patch. minibuffer-selected-window > > returns a window, not a buffer, and it returns the window that you > > didn't want, AFAIU. > > The check in the patch is whether the buffer of the > minibuffer-selected-window is the current buffer. It's meant to fail > when you are about to start a recursive minibuffer. Isn't that test fragile as well? Which buffer is considered "current" and which window is considered "selected" when the minibuffer is active is always a tricky question. Wouldn't it be better to test instead that the we are in the minibuffer, and if so to use minibuffer-window instead of minibuffer-selected-window? > It may or may not be the best patch, but I would say it's the safe one > if were to fix this in Emacs 29. So is the method I suggest -- assuming that it works. > > Also, was this code introduced in Emacs 28/29 or earlier? > > New in Emacs 29. OK, so we must fix it on the emacs-29 branch. What remains is to decide what fix to use. Thanks.