unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Menu help text not shown when using keyboard
@ 2005-10-23 13:10 Lennart Borgman
  2005-10-23 16:28 ` Eli Zaretskii
  2005-10-24  1:00 ` Richard M. Stallman
  0 siblings, 2 replies; 13+ messages in thread
From: Lennart Borgman @ 2005-10-23 13:10 UTC (permalink / raw)


If you are using the keyboard to navigate the menus then you currently 
get no information about the help text that are associated with the menu 
entries. This help shows up only when you are using the mouse. From an 
accessibility point of view this is not very good.

I would suggest that this help texts where shown in the echo area 
whenever a a menu item is highlighted.

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

* Re: Menu help text not shown when using keyboard
  2005-10-23 13:10 Lennart Borgman
@ 2005-10-23 16:28 ` Eli Zaretskii
  2005-10-23 17:17   ` Lennart Borgman
  2005-10-24  1:00 ` Richard M. Stallman
  1 sibling, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2005-10-23 16:28 UTC (permalink / raw)
  Cc: emacs-devel

> Date: Sun, 23 Oct 2005 15:10:18 +0200
> From: Lennart Borgman <lennart.borgman.073@student.lu.se>
> 
> If you are using the keyboard to navigate the menus then you currently 
> get no information about the help text that are associated with the menu 
> entries.

Please provide a complete and self-contained recipe to reproduce this,
and please tell on what OS you see this.  ``Using keyboard to navigate
the menus'' is not enough info, at least for me, to reproduce the
problem.

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

* Re: Menu help text not shown when using keyboard
  2005-10-23 16:28 ` Eli Zaretskii
@ 2005-10-23 17:17   ` Lennart Borgman
  2005-10-23 22:47     ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Lennart Borgman @ 2005-10-23 17:17 UTC (permalink / raw)
  Cc: emacs-devel

Eli Zaretskii wrote:

>>Date: Sun, 23 Oct 2005 15:10:18 +0200
>>From: Lennart Borgman <lennart.borgman.073@student.lu.se>
>>
>>If you are using the keyboard to navigate the menus then you currently 
>>get no information about the help text that are associated with the menu 
>>entries.
>>    
>>
>
>Please provide a complete and self-contained recipe to reproduce this,
>and please tell on what OS you see this.  ``Using keyboard to navigate
>the menus'' is not enough info, at least for me, to reproduce the
>problem.
>  
>
Sorry, I will try to remember. I am testing on w32:

In GNU Emacs 22.0.50.1 (i386-mingw-nt5.0.2195)
 of 2005-10-22 on W2ONE

Start with emacs -Q and open the menus from the keyboard with F10. 
Navigate to different menu items. Nothing is shown in the echo area. Put 
the mouse over a menu item with a help text. This now pops up in a tooltip.

Now do M-x tooltip-mode RET to turn off tooltip-mode. Try the same 
things as above. The only difference will be that the tooltips instead 
of poping up are shown in the echo area.

Summary:
You do not see the menu help texts if you are navigating the menus with 
the keyboard. This is not good from a portability point of view.

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

* Re: Menu help text not shown when using keyboard
  2005-10-23 17:17   ` Lennart Borgman
@ 2005-10-23 22:47     ` Eli Zaretskii
  2005-10-23 23:04       ` Lennart Borgman
  2005-10-23 23:48       ` Lennart Borgman
  0 siblings, 2 replies; 13+ messages in thread
From: Eli Zaretskii @ 2005-10-23 22:47 UTC (permalink / raw)
  Cc: emacs-devel

> Date: Sun, 23 Oct 2005 19:17:00 +0200
> From: Lennart Borgman <lennart.borgman.073@student.lu.se>
> CC: emacs-devel@gnu.org
> 
> Start with emacs -Q and open the menus from the keyboard with F10. 

Ahh, that...  I think it only works on Windows and perhaps with GTK.

Anyway, our ability to show tooltips in this case depends on whether
the keyboard events that navigate the menus are sent to Emacs's
keyboard queue.  I suspect they aren't.

> You do not see the menu help texts if you are navigating the menus with 
> the keyboard. This is not good from a portability point of view.

??? How is this related to portability?

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

* Re: Menu help text not shown when using keyboard
  2005-10-23 22:47     ` Eli Zaretskii
@ 2005-10-23 23:04       ` Lennart Borgman
  2005-10-23 23:48       ` Lennart Borgman
  1 sibling, 0 replies; 13+ messages in thread
From: Lennart Borgman @ 2005-10-23 23:04 UTC (permalink / raw)
  Cc: emacs-devel

Eli Zaretskii wrote:

>>You do not see the menu help texts if you are navigating the menus with 
>>the keyboard. This is not good from a portability point of view.
>>    
>>
>
>??? How is this related to portability?
>  
>
In my brain only when I am in a hurry. I meant "accessibility".

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

* Re: Menu help text not shown when using keyboard
  2005-10-23 22:47     ` Eli Zaretskii
  2005-10-23 23:04       ` Lennart Borgman
@ 2005-10-23 23:48       ` Lennart Borgman
  2005-10-24  8:01         ` Jason Rumney
  1 sibling, 1 reply; 13+ messages in thread
From: Lennart Borgman @ 2005-10-23 23:48 UTC (permalink / raw)
  Cc: emacs-devel

Eli Zaretskii wrote:

>>Date: Sun, 23 Oct 2005 19:17:00 +0200
>>From: Lennart Borgman <lennart.borgman.073@student.lu.se>
>>CC: emacs-devel@gnu.org
>>
>>Start with emacs -Q and open the menus from the keyboard with F10. 
>>    
>>
>
>Ahh, that...  I think it only works on Windows and perhaps with GTK.
>
>Anyway, our ability to show tooltips in this case depends on whether
>the keyboard events that navigate the menus are sent to Emacs's
>keyboard queue.  I suspect they aren't.
>  
>
I think it is available, at least on w32, see w32menu.c:

void
w32_menu_display_help (HWND owner, HMENU menu, UINT item, UINT flags)
{
  if (get_menu_item_info)
    {
      struct frame *f = x_window_to_frame (&one_w32_display_info, owner);
      Lisp_Object frame, help;

      /* No help echo on owner-draw menu items, or when the keyboard is used
     to navigate the menus, since tooltips are distracting if they pop
     up elsewhere.  */
      if (flags & MF_OWNERDRAW || flags & MF_POPUP
      || !(flags & MF_MOUSESELECT))
    help = Qnil;
      else
...

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

* Re: Menu help text not shown when using keyboard
  2005-10-23 13:10 Lennart Borgman
  2005-10-23 16:28 ` Eli Zaretskii
@ 2005-10-24  1:00 ` Richard M. Stallman
  2005-10-24  8:05   ` Jason Rumney
  1 sibling, 1 reply; 13+ messages in thread
From: Richard M. Stallman @ 2005-10-24  1:00 UTC (permalink / raw)
  Cc: emacs-devel

    If you are using the keyboard to navigate the menus then you currently 
    get no information about the help text that are associated with the menu 
    entries.

Would you like to try to implement this?  I think you need to find the
right code in xmenu.c, and make it call show_help_echo.

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

* Re: Menu help text not shown when using keyboard
  2005-10-23 23:48       ` Lennart Borgman
@ 2005-10-24  8:01         ` Jason Rumney
  2005-10-24  9:26           ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Jason Rumney @ 2005-10-24  8:01 UTC (permalink / raw)
  Cc: Eli Zaretskii, emacs-devel

Lennart Borgman <lennart.borgman.073@student.lu.se> writes:

> I think it is available, at least on w32, see w32menu.c:
>
>       /* No help echo on owner-draw menu items, or when the keyboard is used
>      to navigate the menus, since tooltips are distracting if they pop
>      up elsewhere.  */
>       if (flags & MF_OWNERDRAW || flags & MF_POPUP
>       || !(flags & MF_MOUSESELECT))

That change was made in response to a bug report you made in July,
complaining that tooltips pop up when the keyboard is used to navigate
the menus:

http://lists.gnu.org/archive/html/emacs-devel/2005-07/msg01197.html

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

* Re: Menu help text not shown when using keyboard
  2005-10-24  1:00 ` Richard M. Stallman
@ 2005-10-24  8:05   ` Jason Rumney
  2005-10-24 11:48     ` Lennart Borgman
  0 siblings, 1 reply; 13+ messages in thread
From: Jason Rumney @ 2005-10-24  8:05 UTC (permalink / raw)
  Cc: Lennart Borgman, emacs-devel

"Richard M. Stallman" <rms@gnu.org> writes:

>     If you are using the keyboard to navigate the menus then you currently 
>     get no information about the help text that are associated with the menu 
>     entries.
>
> Would you like to try to implement this?  I think you need to find the
> right code in xmenu.c, and make it call show_help_echo.

The menu selection code is called asynchronously (at least on
Windows). So calling show_help_echo directly is not possible. You have
to call kbd_buffer_store_help_event (frame, help), and somehow arrange
for it to use the minibuffer rather than popping up a tooltip at the
mouse position.

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

* Re: Menu help text not shown when using keyboard
  2005-10-24  8:01         ` Jason Rumney
@ 2005-10-24  9:26           ` Eli Zaretskii
  0 siblings, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2005-10-24  9:26 UTC (permalink / raw)
  Cc: lennart.borgman.073, emacs-devel

> Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
> From: Jason Rumney <jasonr@gnu.org>
> Date: Mon, 24 Oct 2005 09:01:30 +0100
> 
> >       /* No help echo on owner-draw menu items, or when the keyboard is used
> >      to navigate the menus, since tooltips are distracting if they pop
> >      up elsewhere.  */
> >       if (flags & MF_OWNERDRAW || flags & MF_POPUP
> >       || !(flags & MF_MOUSESELECT))
> 
> That change was made in response to a bug report you made in July,
> complaining that tooltips pop up when the keyboard is used to navigate
> the menus:
> 
> http://lists.gnu.org/archive/html/emacs-devel/2005-07/msg01197.html

Do I understand correctly that the bug fixed in July was due to the
fact that Emacs does not know the location of the dropped-down menu,
and so it pops the tooltip near the mouse pointer instead if near the
menu?

If so, we could do one of 2 things:

  1. Calculate the right position somehow.

  2. Show the help-echo message in the echo area.  (This is how many
     Windows GUI applications show menu-related tips.)

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

* Re: Menu help text not shown when using keyboard
@ 2005-10-24  9:58 LENNART BORGMAN
  0 siblings, 0 replies; 13+ messages in thread
From: LENNART BORGMAN @ 2005-10-24  9:58 UTC (permalink / raw)
  Cc: emacs-devel, Jason Rumney

From: Eli Zaretskii <eliz@gnu.org>

> > Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org

http://lists.gnu.org/archive/html/emacs-devel/2005-07/msg01197.html
> 
> Do I understand correctly that the bug fixed in July was due to the
> fact that Emacs does not know the location of the dropped-down menu,
> and so it pops the tooltip near the mouse pointer instead if near the
> menu?
> 
> If so, we could do one of 2 things:
> 
>  1. Calculate the right position somehow.
> 
>  2. Show the help-echo message in the echo area.  (This is how many
>     Windows GUI applications show menu-related tips.)

Yes, that is right. And I was the one that complained. I should perhaps have complained just after the change, but I did not have time then.

I think 2 above is the way to go - at least when the keyboard is used. In fact I would suggest that the help text for the menus are always shown in the echo area. A popup could be used too when the mouse is used.

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

* Re: Menu help text not shown when using keyboard
  2005-10-24  8:05   ` Jason Rumney
@ 2005-10-24 11:48     ` Lennart Borgman
  2005-10-24 13:42       ` Jason Rumney
  0 siblings, 1 reply; 13+ messages in thread
From: Lennart Borgman @ 2005-10-24 11:48 UTC (permalink / raw)
  Cc: Eli Zaretskii, rms, emacs-devel

Jason Rumney wrote:

>"Richard M. Stallman" <rms@gnu.org> writes:
>
>  
>
>>    If you are using the keyboard to navigate the menus then you currently 
>>    get no information about the help text that are associated with the menu 
>>    entries.
>>
>>Would you like to try to implement this?  I think you need to find the
>>right code in xmenu.c, and make it call show_help_echo.
>>    
>>
>
>The menu selection code is called asynchronously (at least on
>Windows). So calling show_help_echo directly is not possible. You have
>to call kbd_buffer_store_help_event (frame, help), and somehow arrange
>for it to use the minibuffer rather than popping up a tooltip at the
>mouse position.
>  
>
Would the way to go be to change kbd_buffer_store_help_event to take new 
parameters? Then we could also arrange to get rid of the timeout for 
certain messages. For menu help text shown in the echo area I see no 
need for a timeout. It does not seem to behave that way in other 
applications and I think it could be rather confusing if it behaves 
differently in Emacs.

I also noticed a small bug. If the menu entry does not have a help text 
then the echo area is not cleared. Try for example "Emacs FAQ" in the 
help menu.

BTW: I always thinks it is difficult to understand in what thread some 
code is supposed to be run. Would it not be good with some notation in 
the comments for this? Or is there some simple way to get this 
information now?

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

* Re: Menu help text not shown when using keyboard
  2005-10-24 11:48     ` Lennart Borgman
@ 2005-10-24 13:42       ` Jason Rumney
  0 siblings, 0 replies; 13+ messages in thread
From: Jason Rumney @ 2005-10-24 13:42 UTC (permalink / raw)
  Cc: Eli Zaretskii, rms, emacs-devel

Lennart Borgman wrote:

> BTW: I always thinks it is difficult to understand in what thread some 
> code is supposed to be run. Would it not be good with some notation in 
> the comments for this? Or is there some simple way to get this 
> information now?

It's not that difficult to figure out. Low level event handling works in 
Frame's UI thread (or in asynchronous signal handlers on X). Everything 
else happens in the main Emacs thread.

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

end of thread, other threads:[~2005-10-24 13:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-24  9:58 Menu help text not shown when using keyboard LENNART BORGMAN
  -- strict thread matches above, loose matches on Subject: below --
2005-10-23 13:10 Lennart Borgman
2005-10-23 16:28 ` Eli Zaretskii
2005-10-23 17:17   ` Lennart Borgman
2005-10-23 22:47     ` Eli Zaretskii
2005-10-23 23:04       ` Lennart Borgman
2005-10-23 23:48       ` Lennart Borgman
2005-10-24  8:01         ` Jason Rumney
2005-10-24  9:26           ` Eli Zaretskii
2005-10-24  1:00 ` Richard M. Stallman
2005-10-24  8:05   ` Jason Rumney
2005-10-24 11:48     ` Lennart Borgman
2005-10-24 13:42       ` Jason Rumney

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