unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8116: 24.0.50; `minibuffer-message': ignore mouse-up event for `sit-for'?
@ 2011-02-25 16:50 Drew Adams
  2011-02-25 18:06 ` Stefan Monnier
  2021-07-18  0:30 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 10+ messages in thread
From: Drew Adams @ 2011-02-25 16:50 UTC (permalink / raw)
  To: 8116

If you pop up a menu (e.g. using `x-popup-menu') and one of its items
calls `minibuffer-message', the user will never see the message,
presumably because the call to `sit-for' in `minibuffer-message' sees
the mouse-up event (from choosing the menu item) as user input,
canceling the `sit-for' timeout.
 
Seems like we should be able to make this work somehow.  Perhaps
`sit-for' could accept an optional arg listing a set of events to
ignore, and `minibuffer-message' could then call it with mouse-up
in that list?
 
But should _all_ uses of `minibuffer-message' ignore `mouse-up' events
wrt the timeout?  Dunno.  Sounds doubtful.
 
Still, this seems like something we should be able to handle, so that
users can see a message associated with a menu item.
 
Example use: A user chooses a menu item to cycle some variable/behavior
(e.g. a sort order) to the next possible value, and the action ends with
a message echoing what the new value is.  Currently, the user can do
this over and over without ever seeing what the new value is each time.
In some contexts it might not be convenient for the user to stop the
overall interaction just to interrogate the value.  That is, use of
the popup menu might be only one link in a chain of user interactions.
 
One possibility might be to move the `sit-for' out of
`minibuffer-message', making the calling code be responsible for it
instead.  That would be analogous to the way `message' is used.  But I'm
not sure how that would affect other things - perhaps it is important
that `minibuffer-message' calls `sit-for' itself.  Dunno.
 

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-02-14 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
 






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

* bug#8116: 24.0.50; `minibuffer-message': ignore mouse-up event for `sit-for'?
  2011-02-25 16:50 bug#8116: 24.0.50; `minibuffer-message': ignore mouse-up event for `sit-for'? Drew Adams
@ 2011-02-25 18:06 ` Stefan Monnier
  2011-02-25 18:27   ` Drew Adams
  2021-07-18  0:30 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2011-02-25 18:06 UTC (permalink / raw)
  To: Drew Adams; +Cc: 8116

> If you pop up a menu (e.g. using `x-popup-menu') and one of its items
> calls `minibuffer-message', the user will never see the message,
> presumably because the call to `sit-for' in `minibuffer-message' sees
> the mouse-up event (from choosing the menu item) as user input,
> canceling the `sit-for' timeout.
 
> Seems like we should be able to make this work somehow.  Perhaps

Agreed.  I think the way to attack this is elsewhere, tho: the mouse-up
should be eaten up by the menu code.


        Stefan





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

* bug#8116: 24.0.50; `minibuffer-message': ignore mouse-up event for `sit-for'?
  2011-02-25 18:06 ` Stefan Monnier
@ 2011-02-25 18:27   ` Drew Adams
  0 siblings, 0 replies; 10+ messages in thread
From: Drew Adams @ 2011-02-25 18:27 UTC (permalink / raw)
  To: 'Stefan Monnier'; +Cc: 8116

> > Seems like we should be able to make this work somehow.
> 
> Agreed.  I think the way to attack this is elsewhere, tho: 
> the mouse-up should be eaten up by the menu code.

Yes, that sounds good.

Dunno whether that would ever be an inconvenience - I can't think of a negative
use case.  Seems like every menu selection action would always involve mouse
down + up.






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

* bug#8116: 24.0.50; `minibuffer-message': ignore mouse-up event for `sit-for'?
  2011-02-25 16:50 bug#8116: 24.0.50; `minibuffer-message': ignore mouse-up event for `sit-for'? Drew Adams
  2011-02-25 18:06 ` Stefan Monnier
@ 2021-07-18  0:30 ` Lars Ingebrigtsen
  2021-07-18  2:05   ` bug#8116: [External] : " Drew Adams
  2021-07-18  6:50   ` Eli Zaretskii
  1 sibling, 2 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-18  0:30 UTC (permalink / raw)
  To: Drew Adams; +Cc: 8116

"Drew Adams" <drew.adams@oracle.com> writes:

> If you pop up a menu (e.g. using `x-popup-menu') and one of its items
> calls `minibuffer-message', the user will never see the message,
> presumably because the call to `sit-for' in `minibuffer-message' sees
> the mouse-up event (from choosing the menu item) as user input,
> canceling the `sit-for' timeout.

Do you have a test case that demonstrates the problem?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#8116: [External] : Re: bug#8116: 24.0.50; `minibuffer-message': ignore mouse-up event for `sit-for'?
  2021-07-18  0:30 ` Lars Ingebrigtsen
@ 2021-07-18  2:05   ` Drew Adams
  2021-07-18 12:04     ` Lars Ingebrigtsen
  2021-07-18  6:50   ` Eli Zaretskii
  1 sibling, 1 reply; 10+ messages in thread
From: Drew Adams @ 2021-07-18  2:05 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 8116@debbugs.gnu.org

> Do you have a test case that demonstrates the problem?

The problem is specified in the bug report.

Whether the situation is problematic in the same way as
when the problem was reported, 10 years ago, someone
who uses Emacs 27 or the incipient 28 can investigate.





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

* bug#8116: 24.0.50; `minibuffer-message': ignore mouse-up event for `sit-for'?
  2021-07-18  0:30 ` Lars Ingebrigtsen
  2021-07-18  2:05   ` bug#8116: [External] : " Drew Adams
@ 2021-07-18  6:50   ` Eli Zaretskii
  2021-07-18 12:09     ` Lars Ingebrigtsen
  2021-07-18 14:10     ` bug#8116: [External] : " Drew Adams
  1 sibling, 2 replies; 10+ messages in thread
From: Eli Zaretskii @ 2021-07-18  6:50 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 8116

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Sun, 18 Jul 2021 02:30:08 +0200
> Cc: 8116@debbugs.gnu.org
> 
> "Drew Adams" <drew.adams@oracle.com> writes:
> 
> > If you pop up a menu (e.g. using `x-popup-menu') and one of its items
> > calls `minibuffer-message', the user will never see the message,
> > presumably because the call to `sit-for' in `minibuffer-message' sees
> > the mouse-up event (from choosing the menu item) as user input,
> > canceling the `sit-for' timeout.
> 
> Do you have a test case that demonstrates the problem?

You won't be able to see this on any system but MS-Windows.  On
Windows, the Emacs menus are implemented in a way that has this
unfortunate side effect: we basically preempt the Emacs command loop
for as long as the menu stays open.

If someone wants to redesign how Emacs menus are implemented on
Windows, I think that would be very welcome.  But until that happens,
this is Emacs "functioning as designed", not some easily-fixed bug.





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

* bug#8116: [External] : Re: bug#8116: 24.0.50; `minibuffer-message': ignore mouse-up event for `sit-for'?
  2021-07-18  2:05   ` bug#8116: [External] : " Drew Adams
@ 2021-07-18 12:04     ` Lars Ingebrigtsen
  2021-07-18 14:18       ` Drew Adams
  0 siblings, 1 reply; 10+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-18 12:04 UTC (permalink / raw)
  To: Drew Adams; +Cc: 8116@debbugs.gnu.org

Drew Adams <drew.adams@oracle.com> writes:

>> Do you have a test case that demonstrates the problem?
>
> The problem is specified in the bug report.

A test case makes it much more likely that somebody will take the effort
to poke at this problem.  Without a test case, that somebody will first
have to come up with one themselves.

But if you're not interested in being helpful, that's fine, of course.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#8116: 24.0.50; `minibuffer-message': ignore mouse-up event for `sit-for'?
  2021-07-18  6:50   ` Eli Zaretskii
@ 2021-07-18 12:09     ` Lars Ingebrigtsen
  2021-07-18 14:10     ` bug#8116: [External] : " Drew Adams
  1 sibling, 0 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-18 12:09 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 8116

Eli Zaretskii <eliz@gnu.org> writes:

> You won't be able to see this on any system but MS-Windows.  On
> Windows, the Emacs menus are implemented in a way that has this
> unfortunate side effect: we basically preempt the Emacs command loop
> for as long as the menu stays open.

Ah, I see.  I'll rename the bug report to be more specific, then.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#8116: [External] : Re: bug#8116: 24.0.50; `minibuffer-message': ignore mouse-up event for `sit-for'?
  2021-07-18  6:50   ` Eli Zaretskii
  2021-07-18 12:09     ` Lars Ingebrigtsen
@ 2021-07-18 14:10     ` Drew Adams
  1 sibling, 0 replies; 10+ messages in thread
From: Drew Adams @ 2021-07-18 14:10 UTC (permalink / raw)
  To: Eli Zaretskii, Lars Ingebrigtsen; +Cc: 8116@debbugs.gnu.org

> > > If you pop up a menu (e.g. using `x-popup-menu') and one of its items
> > > calls `minibuffer-message', the user will never see the message,
> > > presumably because the call to `sit-for' in `minibuffer-message' sees
> > > the mouse-up event (from choosing the menu item) as user input,
> > > canceling the `sit-for' timeout.
> >
> > Do you have a test case that demonstrates the problem?
> 
> You won't be able to see this on any system but MS-Windows.  On
> Windows, the Emacs menus are implemented in a way that has this
> unfortunate side effect: we basically preempt the Emacs command loop
> for as long as the menu stays open.
> 
> If someone wants to redesign how Emacs menus are implemented on
> Windows, I think that would be very welcome.  But until that happens,
> this is Emacs "functioning as designed", not some easily-fixed bug.

Thanks for this info.  I guess the bug can then either
be closed or kept open in the wishlist, the fix needing
redesign etc.

I wonder if this effect should be mentioned in the manual?





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

* bug#8116: [External] : Re: bug#8116: 24.0.50; `minibuffer-message': ignore mouse-up event for `sit-for'?
  2021-07-18 12:04     ` Lars Ingebrigtsen
@ 2021-07-18 14:18       ` Drew Adams
  0 siblings, 0 replies; 10+ messages in thread
From: Drew Adams @ 2021-07-18 14:18 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 8116@debbugs.gnu.org

> But if you're not interested in being helpful,
> that's fine, of course.

Yet another snarky disparagement.  Not helpful.

Follows on your "since Drew can't be bothered"
to send a patch - when the bug report provided
the exact replacement for the single function
that needed to be replaced.





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

end of thread, other threads:[~2021-07-18 14:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-25 16:50 bug#8116: 24.0.50; `minibuffer-message': ignore mouse-up event for `sit-for'? Drew Adams
2011-02-25 18:06 ` Stefan Monnier
2011-02-25 18:27   ` Drew Adams
2021-07-18  0:30 ` Lars Ingebrigtsen
2021-07-18  2:05   ` bug#8116: [External] : " Drew Adams
2021-07-18 12:04     ` Lars Ingebrigtsen
2021-07-18 14:18       ` Drew Adams
2021-07-18  6:50   ` Eli Zaretskii
2021-07-18 12:09     ` Lars Ingebrigtsen
2021-07-18 14:10     ` bug#8116: [External] : " Drew Adams

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).