From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#48249: 28.0.50; Regression: emacs confused about window configuration due to ido-mode and/or winner-mode Date: Fri, 7 May 2021 09:49:15 +0000 Message-ID: References: <87zgx8wmew.fsf@secretsauce.net> <87im3wm4cp.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18564"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, 48249@debbugs.gnu.org To: Dima Kogan , "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 07 11:50:24 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 1lex7n-0004i4-Qu for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 May 2021 11:50:23 +0200 Original-Received: from localhost ([::1]:57812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lex7m-0000GD-Od for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 May 2021 05:50:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lex7R-0000Fq-TE for bug-gnu-emacs@gnu.org; Fri, 07 May 2021 05:50:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59552) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lex7R-0001mM-Kl for bug-gnu-emacs@gnu.org; Fri, 07 May 2021 05:50:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lex7R-0002Eh-IB for bug-gnu-emacs@gnu.org; Fri, 07 May 2021 05:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 May 2021 09:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48249 X-GNU-PR-Package: emacs Original-Received: via spool by 48249-submit@debbugs.gnu.org id=B48249.16203809688579 (code B ref 48249); Fri, 07 May 2021 09:50:01 +0000 Original-Received: (at 48249) by debbugs.gnu.org; 7 May 2021 09:49:28 +0000 Original-Received: from localhost ([127.0.0.1]:42864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lex6t-0002EJ-J7 for submit@debbugs.gnu.org; Fri, 07 May 2021 05:49:27 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:65313 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lex6o-0002ED-TH for 48249@debbugs.gnu.org; Fri, 07 May 2021 05:49:26 -0400 Original-Received: (qmail 35504 invoked by uid 3782); 7 May 2021 09:49:15 -0000 Original-Received: from acm.muc.de (p4fe15bd7.dip0.t-ipconnect.de [79.225.91.215]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 07 May 2021 11:49:15 +0200 Original-Received: (qmail 4615 invoked by uid 1000); 7 May 2021 09:49:15 -0000 Content-Disposition: inline In-Reply-To: <87im3wm4cp.fsf@tcd.ie> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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:205909 Archived-At: Hello, Dima and Basil. On Thu, May 06, 2021 at 13:30:46 +0100, Basil L. Contovounesios wrote: > Dima Kogan writes: > > Hi. I'm running a bleeding-edge build of emacs, and I've been observing > > a really annoying behavior regression for the last few months. It was > > somewhat elusive, but I finally just figured out how to reproduce it, so > > I'm now reporting the bug. > > > > Emacs periodically gets into a confused state, where simple commands > > like (switch-to-other-buffer) start doing strange things (switching to > > the wrong buffer, messing with the window configuration, etc). And the > > point often gets stuck in the minibuffer, requiring an explicit switch > > command to get out of there. Killing that emacs frame, and starting a > > new one (I'm using the emacs server) would fix it for the new frame for > > a while, until that frame gets confused too. > Exactly the same story here with ivy-mode and winner-mode. I thought > I'd found a reproducer in https://bugs.gnu.org/48229, but that's > actually a duplicate of https://bugs.gnu.org/47766, which was fixed > today: > Fix wrong handling of minibuffers when frames get iconified/made invisible > c873d16af6 2021-05-06 10:48:14 +0000 > https://git.sv.gnu.org/cgit/emacs.git/commit/?id=c873d16af61ae9b956c6dd6d9e50ebad2bb7666e > > I haven't tried to rebuild today, but this bug exists in the emacs git > > as of May 1. > I can confirm the bug in your recipe still happens with latest master > (report-emacs-bug details follow my signature). CCing Alan. OK, could you both please try out the following patch. Forgive me for not explaining the mechanism of the bug here, it is somewhat involved. I'm not happy about the internal mechanisms which went wrong, and I might try later to make these more robust. diff --git a/lisp/winner.el b/lisp/winner.el index f30fa6cf5c..a60ef44662 100644 --- a/lisp/winner.el +++ b/lisp/winner.el @@ -212,7 +212,7 @@ winner-set-conf (minisize (window-height miniwin))) (cl-letf (((window-buffer miniwin)) ((window-point miniwin))) - (set-window-configuration winconf)) + (set-window-configuration winconf nil t)) (cond ((window-live-p chosen) (select-window chosen)) ((window-minibuffer-p) (other-window 1))) > Thanks, > -- > Basil > In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) > of 2021-05-06 built on tia > Repository revision: 5ec4a3dbbc81ef9ed51065189a19689c351e0e8d > Repository branch: master > Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 > System Description: Debian GNU/Linux bullseye/sid -- Alan Mackenzie (Nuremberg, Germany).