From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#47894: 28.0.50; isearch does not work if enable-recursive-minibuffers is on and some input method is set. Date: Wed, 21 Apr 2021 17:18:36 +0000 Message-ID: <192e82f20fe0d0cd2448@heytings.org> References: <87eef6p8bh.fsf@gmail.com> <874kg0d8ui.fsf@mail.linkov.net> <192e82f20f7e5133aaea@heytings.org> <6f6e4aa5-9fdf-b4e6-04d5-c43448d67623@gmx.at> <192e82f20f92affaec0e@heytings.org> <87o8e7bmgl.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14979"; mail-complaints-to="usenet@ciao.gmane.io" Cc: max.brieiev@gmail.com, 47894@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 21 19:19:16 2021 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 1lZGVP-0003gW-Hx for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 21 Apr 2021 19:19:15 +0200 Original-Received: from localhost ([::1]:50772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZGVO-00055X-7x for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 21 Apr 2021 13:19:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZGVD-00055C-0z for bug-gnu-emacs@gnu.org; Wed, 21 Apr 2021 13:19:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48158) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lZGVC-00038V-QI for bug-gnu-emacs@gnu.org; Wed, 21 Apr 2021 13:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lZGVC-0003Id-G8; Wed, 21 Apr 2021 13:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Wed, 21 Apr 2021 17:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47894 X-GNU-PR-Package: emacs,gnus Original-Received: via spool by 47894-submit@debbugs.gnu.org id=B47894.161902552112658 (code B ref 47894); Wed, 21 Apr 2021 17:19:02 +0000 Original-Received: (at 47894) by debbugs.gnu.org; 21 Apr 2021 17:18:41 +0000 Original-Received: from localhost ([127.0.0.1]:59704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZGUr-0003I4-HG for submit@debbugs.gnu.org; Wed, 21 Apr 2021 13:18:41 -0400 Original-Received: from heytings.org ([95.142.160.155]:47710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZGUo-0003Hv-BM for 47894@debbugs.gnu.org; Wed, 21 Apr 2021 13:18:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1619025517; bh=9QuCBjSwMyeVLvUEtDjGQPhe80wFBsqVT89LEUZhHgw=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=pWoRNuJtHUSutW7hYq/33t8ewuQQKgpGhF1Y+ir/DuW8rySUCKKgTmUobih/SMA6P 5/Lq39Q+wjBwXCuS74UsUjNCM4IEM8NGiNL8DZ1uRbX2PMmykQ+wHZbdqcu/e9HhMJ 0j0YGmVbIHIJHSyyJHIJP+WJp3pB+bMeQDkr8CXNGBcM4cSPNDn6NjRPEcV3EPViBS AATsDsu6PenQCjjEh7uSZaHEyZ/Ish2QaNb6YMEiKVPbjbRDE/GUquM4DowgQuIHiU RT5Lmipb/THYZ4KUyBE8BUO20DKGFh50ZnsVETH8Uj1OIWQosdLaGqr6i8y9s+Gcml Ud2HcUc9DUfQQ== In-Reply-To: <87o8e7bmgl.fsf@mail.linkov.net> 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" Xref: news.gmane.io gmane.emacs.bugs:204643 Archived-At: >>> For users (eq (current-buffer) (window-buffer)) _should_ be invariant. >>> When and if an application temporarily violates that invariant, it >>> should reestablish it before the user can see it. So if an >>> application calls `display-buffer' in a state where the invariant does >>> not hold, it should handle that case including the complication that >>> `display-buffer' might have selected another window. And it goes >>> without saying that a display buffer action should never violate that >>> invariant. >> >> I see. So in this case the bug was elsewhere as I thought, it's >> display-buffer-select which was wrong (as you said it should have used >> pop-to-buffer) and not the code I added in isearch-post-command-hook. >> Anyway using (window-buffer (selected-window)) should not harm, and is >> an extra safety against display buffer actions doing something weird. > > As this bug report indicates, automatically exiting isearch does more > harm. > I guess it's a matter of interpretation here. In this bug report isearch was automatically exited by error, because isearch-post-command-hook is executed inside the minibuffer (I'm not sure it should be). On the contrary, what Zhiwei Chen asked is what the patch does: exit isearch when point has moved to another window at the request of the user. > > So rather than forcibly exit isearch, we could select the original > window back, in the same vein as isearch-back-into-window in the same > hook moves point back to the old window boundaries: > That would be the opposite of what Zhiwei Chen asked (twice), but I won't fight for him.