unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Dima Kogan <dima@secretsauce.net>,
	"Basil L. Contovounesios" <contovob@tcd.ie>
Cc: acm@muc.de, 48249@debbugs.gnu.org
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	[thread overview]
Message-ID: <YJUNG7HynPoo89r+@ACM> (raw)
In-Reply-To: <87im3wm4cp.fsf@tcd.ie>

Hello, Dima and Basil.

On Thu, May 06, 2021 at 13:30:46 +0100, Basil L. Contovounesios wrote:
> Dima Kogan <dima@secretsauce.net> 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).





  parent reply	other threads:[~2021-05-07  9:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06  3:50 bug#48249: 28.0.50; Regression: emacs confused about window configuration due to ido-mode and/or winner-mode Dima Kogan
2021-05-06  7:30 ` Gregory Heytings
2021-05-06  8:04   ` Eli Zaretskii
2021-05-06  8:17     ` Gregory Heytings
2021-05-06  9:39       ` Eli Zaretskii
2021-05-06  9:57         ` Gregory Heytings
2021-05-06 10:15           ` Eli Zaretskii
2021-05-06 11:48             ` Gregory Heytings
2021-05-06 12:30 ` Basil L. Contovounesios
2021-05-06 12:39   ` Gregory Heytings
2021-05-06 13:25     ` Basil L. Contovounesios
2021-05-06 13:38       ` Gregory Heytings
2021-05-06 13:58         ` Gregory Heytings
2021-05-06 14:22         ` Basil L. Contovounesios
2021-05-06 14:49     ` Basil L. Contovounesios
2021-05-06 19:25   ` Alan Mackenzie
2021-05-07  9:49   ` Alan Mackenzie [this message]
2021-05-07 10:24     ` Basil L. Contovounesios
2021-05-07 12:02     ` Gregory Heytings
2021-05-07 12:43       ` Alan Mackenzie
2021-05-07 20:30     ` Dima Kogan
2021-05-08 12:30       ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YJUNG7HynPoo89r+@ACM \
    --to=acm@muc.de \
    --cc=48249@debbugs.gnu.org \
    --cc=contovob@tcd.ie \
    --cc=dima@secretsauce.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).