all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#44517: 28.0.50; Can't unselect minibuffer window
@ 2020-11-08 12:28 Michael Heerdegen
  2020-11-08 14:02 ` Alan Mackenzie
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Heerdegen @ 2020-11-08 12:28 UTC (permalink / raw)
  To: 44517; +Cc: Alan Mackenzie


Hello,

since some days, I experience the following issue: when I call

  (read-from-minibuffer "Enter something: ")

and select a different window, the minibuffer window automatically gets
re-selected after a short period of time.

I did not yet figure out how to reproduce for emacs -Q; with the default
settings, it is not reproducible there.

With my setup, the issue gets fixed when I do

  (setq minibuffer-follows-selected-frame nil)

I CC Alan hoping 2ecbf4cfae, "Allow minibuffer to stay in its original
frame.  Tidy up this area." is related and he can help so that I can get
around finding a recipe or digging further (well, it's Sunday).

TIA,

Michael.


In GNU Emacs 28.0.50 (build 94, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.16.0)
 of 2020-11-08 built on drachen
Repository revision: 1b2fde216cf9328578b6a6a9a8ce0ce51035304c
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Debian GNU/Linux bullseye/sid

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY
INOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS JSON PDUMPER LCMS2

Important settings:
  value of $LC_ALL: de_DE.utf8
  value of $LC_COLLATE: C
  value of $LC_TIME: C
  value of $LANG: de_DE.utf8
  locale-coding-system: utf-8-unix








^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#44517: 28.0.50; Can't unselect minibuffer window
  2020-11-08 12:28 bug#44517: 28.0.50; Can't unselect minibuffer window Michael Heerdegen
@ 2020-11-08 14:02 ` Alan Mackenzie
  2020-11-08 16:40   ` Michael Heerdegen
  0 siblings, 1 reply; 11+ messages in thread
From: Alan Mackenzie @ 2020-11-08 14:02 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: acm, 44517

Hello, Michael.

On Sun, Nov 08, 2020 at 13:28:29 +0100, Michael Heerdegen wrote:

> Hello,

> since some days, I experience the following issue: when I call

>   (read-from-minibuffer "Enter something: ")

> and select a different window, ....

With the mouse?  With C-x o?

> .... the minibuffer window automatically gets re-selected after a
> short period of time.

How short?  0.5s, 2s, 10s?  Knowing this might help identify the
associated timer.

> I did not yet figure out how to reproduce for emacs -Q; with the
> default settings, it is not reproducible there.

> With my setup, the issue gets fixed when I do

>   (setq minibuffer-follows-selected-frame nil)

Thanks.  That suggests, vaguely, that the problem might be in the
function move_minibuffer_onto_frame (in src/minibuf.c), which takes no
action when minibuffer-follows-selected-frame is nil.

> I CC Alan hoping 2ecbf4cfae, "Allow minibuffer to stay in its original
> frame.  Tidy up this area." is related and he can help so that I can
> get around finding a recipe or digging further (well, it's Sunday).

I strongly suspect your bug and that patch are related.  Despite it
being Sunday, could you perhaps nevertheless dig around a bit in the
hope of finding a recipe.

Thanks!

> TIA,

> Michael.


> In GNU Emacs 28.0.50 (build 94, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.16.0)
>  of 2020-11-08 built on drachen
> Repository revision: 1b2fde216cf9328578b6a6a9a8ce0ce51035304c
> Repository branch: master
> Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
> System Description: Debian GNU/Linux bullseye/sid

> Configured features:
> XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY
> INOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ ZLIB
> TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS JSON PDUMPER LCMS2

> Important settings:
>   value of $LC_ALL: de_DE.utf8
>   value of $LC_COLLATE: C
>   value of $LC_TIME: C
>   value of $LANG: de_DE.utf8
>   locale-coding-system: utf-8-unix

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#44517: 28.0.50; Can't unselect minibuffer window
  2020-11-08 14:02 ` Alan Mackenzie
@ 2020-11-08 16:40   ` Michael Heerdegen
  2020-11-08 16:48     ` Michael Heerdegen
  2020-11-08 17:05     ` Eli Zaretskii
  0 siblings, 2 replies; 11+ messages in thread
From: Michael Heerdegen @ 2020-11-08 16:40 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: 44517

Alan Mackenzie <acm@muc.de> writes:

> >   (read-from-minibuffer "Enter something: ")
>
> > and select a different window, ....
>
> With the mouse?  With C-x o?

In any way I tried, actually.

> How short?  0.5s, 2s, 10s?  Knowing this might help identify the
> associated timer.

The time seems to differ.  It's between .1 and 1.0 seconds I would
guess.  BTW, setting `timer-list' or `timer-idle-list' to nil in the
active minibuffer didn't change the behavior.

> I strongly suspect your bug and that patch are related.  Despite it
> being Sunday, could you perhaps nevertheless dig around a bit in the
> hope of finding a recipe.

Ok, let's see if can find one.  One more data point: with my setup I can
only reproduce when there are at least two visible frames.


Michael.






^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#44517: 28.0.50; Can't unselect minibuffer window
  2020-11-08 16:40   ` Michael Heerdegen
@ 2020-11-08 16:48     ` Michael Heerdegen
  2020-11-08 17:31       ` martin rudalics
  2020-11-08 17:05     ` Eli Zaretskii
  1 sibling, 1 reply; 11+ messages in thread
From: Michael Heerdegen @ 2020-11-08 16:48 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: 44517

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Ok, let's see if can find one.  One more data point: with my setup I can
> only reproduce when there are at least two visible frames.

That's actually already all you need to reproduce in emacs -Q: open a
second (window-system) frame.

Then eval something like (read-string "--> ") and hit C-x o.

Sometimes the minibuffer is re-selected right away, sometimes only after
hitting one more key like C-f.

Can you now reproduce?

TIA, Regards,

Michael.






^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#44517: 28.0.50; Can't unselect minibuffer window
  2020-11-08 16:40   ` Michael Heerdegen
  2020-11-08 16:48     ` Michael Heerdegen
@ 2020-11-08 17:05     ` Eli Zaretskii
  2020-11-08 17:25       ` Michael Heerdegen
  1 sibling, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2020-11-08 17:05 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: acm, 44517

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Date: Sun, 08 Nov 2020 17:40:49 +0100
> Cc: 44517@debbugs.gnu.org
> 
> > How short?  0.5s, 2s, 10s?  Knowing this might help identify the
> > associated timer.
> 
> The time seems to differ.  It's between .1 and 1.0 seconds I would
> guess.  BTW, setting `timer-list' or `timer-idle-list' to nil in the
> active minibuffer didn't change the behavior.

This probably means that the delay is not due to a timer, but to a
call to sit-for or somesuch.  For example, if you type C-x, the echo
appears after a delay that doesn't have to do anything with timers.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#44517: 28.0.50; Can't unselect minibuffer window
  2020-11-08 17:05     ` Eli Zaretskii
@ 2020-11-08 17:25       ` Michael Heerdegen
  2020-11-08 17:54         ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Heerdegen @ 2020-11-08 17:25 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: acm, 44517

Eli Zaretskii <eliz@gnu.org> writes:

> This probably means that the delay is not due to a timer, but to a
> call to sit-for or somesuch.  For example, if you type C-x, the echo
> appears after a delay that doesn't have to do anything with timers.

Sounds reasonable, yes.

I didn't find out anything on the Lisp level.  `post-command-hook'
doesn't seem to be involved.  I traced some potentially related
functions, like `sit-for' and `select-window' but they were not called
when the issue happened.

Regards,

Michael.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#44517: 28.0.50; Can't unselect minibuffer window
  2020-11-08 16:48     ` Michael Heerdegen
@ 2020-11-08 17:31       ` martin rudalics
  2020-11-08 17:57         ` Michael Heerdegen
  0 siblings, 1 reply; 11+ messages in thread
From: martin rudalics @ 2020-11-08 17:31 UTC (permalink / raw)
  To: Michael Heerdegen, Alan Mackenzie; +Cc: 44517

 >> Ok, let's see if can find one.  One more data point: with my setup I can
 >> only reproduce when there are at least two visible frames.
 >
 > That's actually already all you need to reproduce in emacs -Q: open a
 > second (window-system) frame.
 >
 > Then eval something like (read-string "--> ") and hit C-x o.
 >
 > Sometimes the minibuffer is re-selected right away, sometimes only after
 > hitting one more key like C-f.

If yours is an optimized build, try with Alan's fix for Bug#44502.

martin





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#44517: 28.0.50; Can't unselect minibuffer window
  2020-11-08 17:25       ` Michael Heerdegen
@ 2020-11-08 17:54         ` Eli Zaretskii
  0 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2020-11-08 17:54 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: acm, 44517

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: acm@muc.de,  44517@debbugs.gnu.org
> Date: Sun, 08 Nov 2020 18:25:11 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > This probably means that the delay is not due to a timer, but to a
> > call to sit-for or somesuch.  For example, if you type C-x, the echo
> > appears after a delay that doesn't have to do anything with timers.
> 
> Sounds reasonable, yes.
> 
> I didn't find out anything on the Lisp level.  `post-command-hook'
> doesn't seem to be involved.  I traced some potentially related
> functions, like `sit-for' and `select-window' but they were not called
> when the issue happened.

There's sit_for in dispnew.c.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#44517: 28.0.50; Can't unselect minibuffer window
  2020-11-08 17:31       ` martin rudalics
@ 2020-11-08 17:57         ` Michael Heerdegen
  2020-11-09 10:50           ` Michael Heerdegen
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Heerdegen @ 2020-11-08 17:57 UTC (permalink / raw)
  To: martin rudalics; +Cc: Alan Mackenzie, 44517

martin rudalics <rudalics@gmx.at> writes:

> If yours is an optimized build, try with Alan's fix for Bug#44502.

Yes, an optimized build.  And the fix has been committed to master.
After fetching master and rebuilding I can't reproduce indeed.

Thanks,

Michael.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#44517: 28.0.50; Can't unselect minibuffer window
  2020-11-08 17:57         ` Michael Heerdegen
@ 2020-11-09 10:50           ` Michael Heerdegen
  2020-11-09 11:54             ` Alan Mackenzie
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Heerdegen @ 2020-11-09 10:50 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: 44517

Michael Heerdegen <michael_heerdegen@web.de> writes:

> martin rudalics <rudalics@gmx.at> writes:
>
> > If yours is an optimized build, try with Alan's fix for Bug#44502.
>
> Yes, an optimized build.  And the fix has been committed to master.
> After fetching master and rebuilding I can't reproduce indeed.

I leave it up to Alan whether this report can already be closed.

Thanks,

Michael.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#44517: 28.0.50; Can't unselect minibuffer window
  2020-11-09 10:50           ` Michael Heerdegen
@ 2020-11-09 11:54             ` Alan Mackenzie
  0 siblings, 0 replies; 11+ messages in thread
From: Alan Mackenzie @ 2020-11-09 11:54 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 44517-done

Hello, Michael.

On Mon, Nov 09, 2020 at 11:50:55 +0100, Michael Heerdegen wrote:
> Michael Heerdegen <michael_heerdegen@web.de> writes:

> > martin rudalics <rudalics@gmx.at> writes:

> > > If yours is an optimized build, try with Alan's fix for Bug#44502.

> > Yes, an optimized build.  And the fix has been committed to master.
> > After fetching master and rebuilding I can't reproduce indeed.

> I leave it up to Alan whether this report can already be closed.

Sorry I havn't been in touch again.  I got tied up with another problem
of switching frames, which I eventually solved by putting

    (redirect-frame-focus frame nil)

into my site-start.el at a critical point.

I say this bug should now be closed, and thanks for raising it.  In
fact, I am closing it with this post.  It is good that the patch for bug
#44502 solved this one too.

> Thanks,

> Michael.

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-11-09 11:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-08 12:28 bug#44517: 28.0.50; Can't unselect minibuffer window Michael Heerdegen
2020-11-08 14:02 ` Alan Mackenzie
2020-11-08 16:40   ` Michael Heerdegen
2020-11-08 16:48     ` Michael Heerdegen
2020-11-08 17:31       ` martin rudalics
2020-11-08 17:57         ` Michael Heerdegen
2020-11-09 10:50           ` Michael Heerdegen
2020-11-09 11:54             ` Alan Mackenzie
2020-11-08 17:05     ` Eli Zaretskii
2020-11-08 17:25       ` Michael Heerdegen
2020-11-08 17:54         ` Eli Zaretskii

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.