GNU bug report logs - #47894
28.0.50; isearch does not work if enable-recursive-minibuffers is on and some input method is set.

Previous Next

Packages: gnus, emacs;

Reported by: max.brieiev <at> gmail.com

Date: Mon, 19 Apr 2021 16:08:01 UTC

Severity: normal

Tags: fixed

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #46 received at 47894 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: max.brieiev <at> gmail.com, martin rudalics <rudalics <at> gmx.at>,
 47894 <at> debbugs.gnu.org
Subject: Re: 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
>>> 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.




This bug report was last modified 4 years and 35 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.