unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Drop-down menus, popup menus, and popup dialogs supported on TTYs
@ 2013-10-08 18:24 Eli Zaretskii
  2013-10-08 20:18 ` chad
  2013-10-09  4:32 ` Masatake YAMATO
  0 siblings, 2 replies; 24+ messages in thread
From: Eli Zaretskii @ 2013-10-08 18:24 UTC (permalink / raw)
  To: emacs-devel

Trunk revision 114582 adds support for menus on a text-mode terminal.
Typing F10 will drop the Files menu, and you can get to the others by
using C-f/C-b and the right/left arrow keys.  Within a menu, C-n/C-p
and the up/down arrows allow navigation between items, and RET selects
an item.  Help-echo for menu items is displayed in the echo area.

If you have a mouse supported, clicking on the menu bar should drop
down the menu under the click; clicking on the mode line or on the
text area should pop up menus specific to those areas.  Navigation
within the menu and selection with a mouse work as you'd expect.

I tested this on the w32 text terminal, with and without a mouse, and
on GNU/Linux without a mouse.  Xterm-mouse still doesn't work as
expected, so there's probably something else to be done about that.

Please test on GNU/Linux terminals with GPM.  Also, I hope I didn't
break the GUI frames (other than w32, which I tested).  The NS build
is my greatest worry, as I couldn't even try compiling it.

HAVE_MENUS is now unconditionally defined by configure.  I didn't yet
remove HAVE_MENUS from the sources, because that could serve as
stopgap and temporary work-around, in case I screwed up some build.
Also, perhaps people will want to have a --without-menus option at
configure time.

This was a long journey for me, it started years ago, when I discussed
possible implementations with Gerd Moellmann (his ideas are at the
core of the implementation, see the commentary in term.c).  Now it's
over.  Enjoy the results.



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-08 18:24 Drop-down menus, popup menus, and popup dialogs supported on TTYs Eli Zaretskii
@ 2013-10-08 20:18 ` chad
  2013-10-09  2:42   ` Eli Zaretskii
  2013-10-09  4:32 ` Masatake YAMATO
  1 sibling, 1 reply; 24+ messages in thread
From: chad @ 2013-10-08 20:18 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On 08 Oct 2013, at 11:24, Eli Zaretskii <eliz@gnu.org> wrote:

> Trunk revision 114582 adds support for menus on a text-mode terminal.
> [...] The NS build
> is my greatest worry, as I couldn't even try compiling it.

A quick test seems to work fine in Terminal on macosx. Anything particularly tricky that I should try?

~Chad




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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-08 20:18 ` chad
@ 2013-10-09  2:42   ` Eli Zaretskii
  0 siblings, 0 replies; 24+ messages in thread
From: Eli Zaretskii @ 2013-10-09  2:42 UTC (permalink / raw)
  To: chad; +Cc: emacs-devel

> From: chad <yandros@MIT.EDU>
> Date: Tue, 8 Oct 2013 13:18:52 -0700
> Cc: emacs-devel@gnu.org
> 
> On 08 Oct 2013, at 11:24, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> > Trunk revision 114582 adds support for menus on a text-mode terminal.
> > [...] The NS build
> > is my greatest worry, as I couldn't even try compiling it.
> 
> A quick test seems to work fine in Terminal on macosx.

Thanks, that's good news.

> Anything particularly tricky that I should try?

Just use it normally and see if anything stands out.



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-08 18:24 Drop-down menus, popup menus, and popup dialogs supported on TTYs Eli Zaretskii
  2013-10-08 20:18 ` chad
@ 2013-10-09  4:32 ` Masatake YAMATO
  2013-10-09 16:35   ` Eli Zaretskii
  1 sibling, 1 reply; 24+ messages in thread
From: Masatake YAMATO @ 2013-10-09  4:32 UTC (permalink / raw)
  To: eliz; +Cc: emacs-devel

Hi,

I've tested on gnome-terminal of Fedora 19 GNU/Linux(without mouse).
It works fine! 

I'd like to report one thing I found during test.
pressing <f10> shows nothing if menu-bar-mode is off.
It is nice if menu-bar is shown temporary and automatically.

Here is a temporary solution. use your code only if 
menu-bar is shown.

Masatake YAMATO

=== modified file 'lisp/menu-bar.el'
*** lisp/menu-bar.el	2013-10-08 15:11:29 +0000
--- lisp/menu-bar.el	2013-10-09 03:52:47 +0000
***************
*** 2394,2400 ****
      (cond
       ((eq type 'x) (x-menu-bar-open frame))
       ((eq type 'w32) (w32-menu-bar-open frame))
!      ((null tty-menu-open-use-tmm)
        (let* ((x tty-menu--initial-menu-x)
  	     (menu (menu-bar-menu-at-x-y x 0 frame)))
  	(popup-menu (or
--- 2394,2401 ----
      (cond
       ((eq type 'x) (x-menu-bar-open frame))
       ((eq type 'w32) (w32-menu-bar-open frame))
!      ((and (null tty-menu-open-use-tmm)
! 	   (not (zerop (or (frame-parameter nil 'menu-bar-lines) 0))))
        (let* ((x tty-menu--initial-menu-x)
  	     (menu (menu-bar-menu-at-x-y x 0 frame)))
  	(popup-menu (or

> Trunk revision 114582 adds support for menus on a text-mode terminal.
> Typing F10 will drop the Files menu, and you can get to the others by
> using C-f/C-b and the right/left arrow keys.  Within a menu, C-n/C-p
> and the up/down arrows allow navigation between items, and RET selects
> an item.  Help-echo for menu items is displayed in the echo area.
> 
> If you have a mouse supported, clicking on the menu bar should drop
> down the menu under the click; clicking on the mode line or on the
> text area should pop up menus specific to those areas.  Navigation
> within the menu and selection with a mouse work as you'd expect.
> 
> I tested this on the w32 text terminal, with and without a mouse, and
> on GNU/Linux without a mouse.  Xterm-mouse still doesn't work as
> expected, so there's probably something else to be done about that.
> 
> Please test on GNU/Linux terminals with GPM.  Also, I hope I didn't
> break the GUI frames (other than w32, which I tested).  The NS build
> is my greatest worry, as I couldn't even try compiling it.
> 
> HAVE_MENUS is now unconditionally defined by configure.  I didn't yet
> remove HAVE_MENUS from the sources, because that could serve as
> stopgap and temporary work-around, in case I screwed up some build.
> Also, perhaps people will want to have a --without-menus option at
> configure time.
> 
> This was a long journey for me, it started years ago, when I discussed
> possible implementations with Gerd Moellmann (his ideas are at the
> core of the implementation, see the commentary in term.c).  Now it's
> over.  Enjoy the results.
> 



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-09  4:32 ` Masatake YAMATO
@ 2013-10-09 16:35   ` Eli Zaretskii
  2013-10-09 17:07     ` Dani Moncayo
                       ` (3 more replies)
  0 siblings, 4 replies; 24+ messages in thread
From: Eli Zaretskii @ 2013-10-09 16:35 UTC (permalink / raw)
  To: Masatake YAMATO; +Cc: emacs-devel

> Date: Wed, 09 Oct 2013 13:32:42 +0900 (JST)
> Cc: emacs-devel@gnu.org
> From: Masatake YAMATO <yamato@redhat.com>
> 
> I've tested on gnome-terminal of Fedora 19 GNU/Linux(without mouse).
> It works fine! 

Thanks for testing.

> I'd like to report one thing I found during test.
> pressing <f10> shows nothing if menu-bar-mode is off.
> It is nice if menu-bar is shown temporary and automatically.
> 
> Here is a temporary solution. use your code only if 
> menu-bar is shown.

Hmm... do people really want to have menus when the menu bar is turned
off?  I thought they disable the menu bar because they don't want any
menus at all.

But if this is what people want, I don't mind.

Opinions?



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-09 16:35   ` Eli Zaretskii
@ 2013-10-09 17:07     ` Dani Moncayo
  2013-10-09 17:46     ` David De La Harpe Golden
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 24+ messages in thread
From: Dani Moncayo @ 2013-10-09 17:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Masatake YAMATO, Emacs development discussions

>> I'd like to report one thing I found during test.
>> pressing <f10> shows nothing if menu-bar-mode is off.
>> It is nice if menu-bar is shown temporary and automatically.
>>
>> Here is a temporary solution. use your code only if
>> menu-bar is shown.
>
> Hmm... do people really want to have menus when the menu bar is turned
> off?  I thought they disable the menu bar because they don't want any
> menus at all.

But F10 is an explicit request for unfolding the menu.  Why not
satisfy that request?

> But if this is what people want, I don't mind.
>
> Opinions?

I fully agree with Masatake's proposal.  It makes much sense to me.


-- 
Dani Moncayo



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-09 16:35   ` Eli Zaretskii
  2013-10-09 17:07     ` Dani Moncayo
@ 2013-10-09 17:46     ` David De La Harpe Golden
  2013-10-09 17:56     ` Gregor Zattler
  2013-10-09 18:12     ` Stefan Monnier
  3 siblings, 0 replies; 24+ messages in thread
From: David De La Harpe Golden @ 2013-10-09 17:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Masatake YAMATO, emacs-devel

On 09/10/13 17:35, Eli Zaretskii wrote:
> Hmm... do people really want to have menus when the menu bar is turned
> off?  I thought they disable the menu bar because they don't want any
> menus at all.
>
> But if this is what people want, I don't mind.
>
> Opinions?
>

I never use it personally, but on emacs 24.3 under x11 at least, F10 - 
as bound by default to menu-bar-open - does still open the global menu 
even when menu-bar-mode is off (though it does use a popup rather than 
top-menu-bar appearance). It might therefore be considered consistent 
for it to still open the menu on the terminal too? So long as F10 can 
still be rebound to something else entirely anyway, it seems okay...



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-09 16:35   ` Eli Zaretskii
  2013-10-09 17:07     ` Dani Moncayo
  2013-10-09 17:46     ` David De La Harpe Golden
@ 2013-10-09 17:56     ` Gregor Zattler
  2013-10-09 18:28       ` Eli Zaretskii
  2013-10-09 18:12     ` Stefan Monnier
  3 siblings, 1 reply; 24+ messages in thread
From: Gregor Zattler @ 2013-10-09 17:56 UTC (permalink / raw)
  To: emacs-devel

Hi Eli, Emacs developers,
* Eli Zaretskii <eliz@gnu.org> [09. Oct. 2013]:
>> Date: Wed, 09 Oct 2013 13:32:42 +0900 (JST)
>> Cc: emacs-devel@gnu.org
>> From: Masatake YAMATO <yamato@redhat.com>
>> I'd like to report one thing I found during test.
>> pressing <f10> shows nothing if menu-bar-mode is off.
>> It is nice if menu-bar is shown temporary and automatically.
 
> Hmm... do people really want to have menus when the menu bar is turned
> off?  I thought they disable the menu bar because they don't want any
> menus at all.

I want to save screen real estate and therefore hide the menu bar
but like to use F10 to temporarily show the menu bar and open
it like so:

(menu-bar-mode 0)
(if (not (string-match "dumb" (getenv "TERM")))
    (global-set-key (kbd "<f10>") 
		    (lambda ()
		      "open/close menu-bar"
		      (interactive)
		      (if menu-bar-mode
			  (menu-bar-mode 0)
			(progn (menu-bar-mode 1) (menu-bar-open))))))

It would be nice if something like this worked on TTYs with real menus.

Thanks, Gregor



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-09 16:35   ` Eli Zaretskii
                       ` (2 preceding siblings ...)
  2013-10-09 17:56     ` Gregor Zattler
@ 2013-10-09 18:12     ` Stefan Monnier
  2013-10-09 19:03       ` Eli Zaretskii
  3 siblings, 1 reply; 24+ messages in thread
From: Stefan Monnier @ 2013-10-09 18:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Masatake YAMATO, emacs-devel

> Hmm... do people really want to have menus when the menu bar is turned
> off?  I thought they disable the menu bar because they don't want any
> menus at all.

The extra line is only useful to tell you what menus are available and
for clicking on it.  If you use F10, the "click on it" part is not
applicable, and maybe you don't care to see what menus are available
before deciding to hit F10.

> But if this is what people want, I don't mind.
> Opinions?

I think it makes a lot of sense.


        Stefan



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-09 17:56     ` Gregor Zattler
@ 2013-10-09 18:28       ` Eli Zaretskii
  2013-10-09 21:26         ` Gregor Zattler
  0 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2013-10-09 18:28 UTC (permalink / raw)
  To: Gregor Zattler; +Cc: emacs-devel

> Date: Wed, 9 Oct 2013 19:56:47 +0200
> From: Gregor Zattler <telegraph@gmx.net>
> 
> (menu-bar-mode 0)
> (if (not (string-match "dumb" (getenv "TERM")))

Why do you need this test?

>     (global-set-key (kbd "<f10>") 
> 		    (lambda ()
> 		      "open/close menu-bar"
> 		      (interactive)
> 		      (if menu-bar-mode
> 			  (menu-bar-mode 0)
> 			(progn (menu-bar-mode 1) (menu-bar-open))))))
> 
> It would be nice if something like this worked on TTYs with real menus.

Doesn't it work with the current trunk?  I see no reason that it
shouldn't.



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-09 18:12     ` Stefan Monnier
@ 2013-10-09 19:03       ` Eli Zaretskii
  2013-10-11 17:01         ` Dani Moncayo
  0 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2013-10-09 19:03 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: yamato, emacs-devel

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: Masatake YAMATO <yamato@redhat.com>, emacs-devel@gnu.org
> Date: Wed, 09 Oct 2013 14:12:14 -0400
> 
> > Hmm... do people really want to have menus when the menu bar is turned
> > off?  I thought they disable the menu bar because they don't want any
> > menus at all.
> 
> The extra line is only useful to tell you what menus are available and
> for clicking on it.  If you use F10, the "click on it" part is not
> applicable, and maybe you don't care to see what menus are available
> before deciding to hit F10.
> 
> > But if this is what people want, I don't mind.
> > Opinions?
> 
> I think it makes a lot of sense.

OK, then Masatake, please commit your change.

Thanks.



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-09 18:28       ` Eli Zaretskii
@ 2013-10-09 21:26         ` Gregor Zattler
  2013-10-10  2:49           ` Eli Zaretskii
  0 siblings, 1 reply; 24+ messages in thread
From: Gregor Zattler @ 2013-10-09 21:26 UTC (permalink / raw)
  To: emacs-devel

Hi Eli, Emacs developers,
* Eli Zaretskii <eliz@gnu.org> [09. Oct. 2013]:
>> Date: Wed, 9 Oct 2013 19:56:47 +0200
>> From: Gregor Zattler <telegraph@gmx.net>
>> 
>> (menu-bar-mode 0)
>> (if (not (string-match "dumb" (getenv "TERM")))
> 
> Why do you need this test?

I put it there because I also use my init.el for starting emacs
from cron jobs and did nit want to interfere there.  But now I
realise that 

latest Emacs assumes TERM to be "dumb" if startet in a terminal
like this:

src/Emacs -Q -nw --debug-init

(getenv "TERM") then returns "dumb".  Is this a bug?



Anyway:
>>     (global-set-key (kbd "<f10>") 
>> 		    (lambda ()
>> 		      "open/close menu-bar"
>> 		      (interactive)
>> 		      (if menu-bar-mode
>> 			  (menu-bar-mode 0)
>> 			(progn (menu-bar-mode 1) (menu-bar-open))))))
>> 
>> It would be nice if something like this worked on TTYs with real menus.
> 
> Doesn't it work with the current trunk?  I see no reason that it
> shouldn't.

It's really nice!  One remark I have is that hitting F10 should
IMHO close the menu if no menu entry was selected up to this
point.  Instead one has to hit ESC (which is also fine but should
not be the only way of leaving the menu).  This is a real
improvement especially for the menu of printing package.

Another remark: The headings of the menus end in ">".  First I
thought this indicates that arrow right goes to the next menu, but
there are no "<" signs.  On the other hand menu entries which
lead to sub menus also end in a ">" while here one has to hit
"RETURN" in order to go to the sub menu.  This is a bit
confusing.  Perhaps arrow right should also lead to the submenu? 

And finally: I did not find a way from the sub menu back to the
main menu besides hitting arrow right (which goes to the next
main menu) and then arrow left.  Perhaps some lynx stype
navigation would improve this?

But these are minor nitpicks.  The new menu on terminals is a
great improvement.  Actually I did not use the printing packages
for its clumsy interface on terminals...

I also tested it on the console.  Works the same.

Thank you very much, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-09 21:26         ` Gregor Zattler
@ 2013-10-10  2:49           ` Eli Zaretskii
  2013-10-10  8:33             ` Gregor Zattler
  0 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2013-10-10  2:49 UTC (permalink / raw)
  To: Gregor Zattler; +Cc: emacs-devel

> Date: Wed, 9 Oct 2013 23:26:22 +0200
> From: Gregor Zattler <telegraph@gmx.net>
> 
> latest Emacs assumes TERM to be "dumb" if startet in a terminal
> like this:
> 
> src/Emacs -Q -nw --debug-init
> 
> (getenv "TERM") then returns "dumb".  Is this a bug?

I don't know.  Why do you think it's a bug?

> It's really nice!  One remark I have is that hitting F10 should
> IMHO close the menu if no menu entry was selected up to this
> point.  Instead one has to hit ESC (which is also fine but should
> not be the only way of leaving the menu).

You can also leave the menu by C-g or ESC ESC ESC.

> Another remark: The headings of the menus end in ">".  First I
> thought this indicates that arrow right goes to the next menu, but
> there are no "<" signs.  On the other hand menu entries which
> lead to sub menus also end in a ">" while here one has to hit
> "RETURN" in order to go to the sub menu.  This is a bit
> confusing.  Perhaps arrow right should also lead to the submenu? 

The ">" is a sign of a submenu.  It appears in the first line because
that is the header, and the entire menu is a "submenu" of that.

> And finally: I did not find a way from the sub menu back to the
> main menu besides hitting arrow right (which goes to the next
> main menu) and then arrow left.  Perhaps some lynx stype
> navigation would improve this?

Not easy to do.  Patches are welcome.

> I also tested it on the console.  Works the same.
> 
> Thank you very much, Gregor

Thanks for testing.



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-10  2:49           ` Eli Zaretskii
@ 2013-10-10  8:33             ` Gregor Zattler
  2013-10-10  9:01               ` Andreas Schwab
  0 siblings, 1 reply; 24+ messages in thread
From: Gregor Zattler @ 2013-10-10  8:33 UTC (permalink / raw)
  To: emacs-devel

Hi Eli, emacs developers,
* Eli Zaretskii <eliz@gnu.org> [10. Oct. 2013]:
>> latest Emacs assumes TERM to be "dumb" if startet in a terminal
>> like this:
>> 
>> src/Emacs -Q -nw --debug-init
>> 
>> (getenv "TERM") then returns "dumb".  Is this a bug?
> 
> I don't know.  Why do you think it's a bug?

Because the environment of this process has
TERM=screen-256c-bce-s and (getenv "TERM") is supposed to return
the value of this environment variable.  It's the terminal where
emacs was started.  It has much richer functionality than a dumb
terminal.  And although the TERM variable is set to "dumb" emacs
uses the features of the terminal quite fine e.g. with respect to
colours.

>> And finally: I did not find a way from the sub menu back to the
>> main menu besides hitting arrow right (which goes to the next
>> main menu) and then arrow left.  Perhaps some lynx stype
>> navigation would improve this?
> 
> Not easy to do.  Patches are welcome.

That's way beyond my capabilities.

Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-10  8:33             ` Gregor Zattler
@ 2013-10-10  9:01               ` Andreas Schwab
  0 siblings, 0 replies; 24+ messages in thread
From: Andreas Schwab @ 2013-10-10  9:01 UTC (permalink / raw)
  To: emacs-devel

Gregor Zattler <telegraph@gmx.net> writes:

> Because the environment of this process has
> TERM=screen-256c-bce-s and (getenv "TERM") is supposed to return
> the value of this environment variable.

TERM is always set to dumb in emacs, since it doesn't provide a display
terminal by default to sub processes.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-09 19:03       ` Eli Zaretskii
@ 2013-10-11 17:01         ` Dani Moncayo
  2013-10-11 17:46           ` Eli Zaretskii
  2013-10-11 18:06           ` Masatake YAMATO
  0 siblings, 2 replies; 24+ messages in thread
From: Dani Moncayo @ 2013-10-11 17:01 UTC (permalink / raw)
  To: Eli Zaretskii
  Cc: Emacs development discussions, Stefan Monnier, Masatake YAMATO

>> > Hmm... do people really want to have menus when the menu bar is turned
>> > off?  I thought they disable the menu bar because they don't want any
>> > menus at all.
>>
>> The extra line is only useful to tell you what menus are available and
>> for clicking on it.  If you use F10, the "click on it" part is not
>> applicable, and maybe you don't care to see what menus are available
>> before deciding to hit F10.
>>
>> > But if this is what people want, I don't mind.
>> > Opinions?
>>
>> I think it makes a lot of sense.
>
> OK, then Masatake, please commit your change.

This isn't yet committed, is it?

In addition and related to the above change, I think that it would be
very convenient to allow closing (exiting) the menu also with F10.  I
intuitively try to do it and, after seeing that it does nothing, go
for `C-g'.

-- 
Dani Moncayo



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-11 17:01         ` Dani Moncayo
@ 2013-10-11 17:46           ` Eli Zaretskii
  2013-10-11 17:56             ` Dani Moncayo
  2013-10-11 18:06           ` Masatake YAMATO
  1 sibling, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2013-10-11 17:46 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: emacs-devel, monnier, yamato

> Date: Fri, 11 Oct 2013 19:01:23 +0200
> From: Dani Moncayo <dmoncayo@gmail.com>
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, Masatake YAMATO <yamato@redhat.com>, 
> 	Emacs development discussions <emacs-devel@gnu.org>
> 
> >> > Hmm... do people really want to have menus when the menu bar is turned
> >> > off?  I thought they disable the menu bar because they don't want any
> >> > menus at all.
> >>
> >> The extra line is only useful to tell you what menus are available and
> >> for clicking on it.  If you use F10, the "click on it" part is not
> >> applicable, and maybe you don't care to see what menus are available
> >> before deciding to hit F10.
> >>
> >> > But if this is what people want, I don't mind.
> >> > Opinions?
> >>
> >> I think it makes a lot of sense.
> >
> > OK, then Masatake, please commit your change.
> 
> This isn't yet committed, is it?

Yes, it is.  Type "M-x menu-bar-mode RET" and then press F10.

> In addition and related to the above change, I think that it would be
> very convenient to allow closing (exiting) the menu also with F10.

Your wish has been granted in trunk revision 114629.



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-11 17:46           ` Eli Zaretskii
@ 2013-10-11 17:56             ` Dani Moncayo
  2013-10-11 18:23               ` Eli Zaretskii
  0 siblings, 1 reply; 24+ messages in thread
From: Dani Moncayo @ 2013-10-11 17:56 UTC (permalink / raw)
  To: Eli Zaretskii
  Cc: Emacs development discussions, Stefan Monnier, Masatake YAMATO

>> > OK, then Masatake, please commit your change.
>>
>> This isn't yet committed, is it?
>
> Yes, it is.  Type "M-x menu-bar-mode RET" and then press F10.

I tried it already, but I saw that the old tmm menu is shown, instead
of the new drop-down menu.  Why?

>> In addition and related to the above change, I think that it would be
>> very convenient to allow closing (exiting) the menu also with F10.
>
> Your wish has been granted in trunk revision 114629.

Thank you!

-- 
Dani Moncayo



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-11 17:01         ` Dani Moncayo
  2013-10-11 17:46           ` Eli Zaretskii
@ 2013-10-11 18:06           ` Masatake YAMATO
  1 sibling, 0 replies; 24+ messages in thread
From: Masatake YAMATO @ 2013-10-11 18:06 UTC (permalink / raw)
  To: dmoncayo; +Cc: eliz, monnier, emacs-devel

On Fri, 11 Oct 2013 19:01:23 +0200, Dani Moncayo <dmoncayo@gmail.com> wrote:
>>> > Hmm... do people really want to have menus when the menu bar is turned
>>> > off?  I thought they disable the menu bar because they don't want any
>>> > menus at all.
>>>
>>> The extra line is only useful to tell you what menus are available and
>>> for clicking on it.  If you use F10, the "click on it" part is not
>>> applicable, and maybe you don't care to see what menus are available
>>> before deciding to hit F10.
>>>
>>> > But if this is what people want, I don't mind.
>>> > Opinions?
>>>
>>> I think it makes a lot of sense.
>>
>> OK, then Masatake, please commit your change.
> 
> This isn't yet committed, is it?

I committed.

See

	http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/114611

 
> In addition and related to the above change, I think that it would be
> very convenient to allow closing (exiting) the menu also with F10.  I
> intuitively try to do it and, after seeing that it does nothing, go
> for `C-g'.

... I remember my old work, on demand menu-bar activation.
    
     http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00324.html

Masatake YAMATO

> -- 
> Dani Moncayo



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-11 17:56             ` Dani Moncayo
@ 2013-10-11 18:23               ` Eli Zaretskii
  2013-10-11 18:32                 ` Dani Moncayo
  0 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2013-10-11 18:23 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: emacs-devel, monnier, yamato

> Date: Fri, 11 Oct 2013 19:56:48 +0200
> From: Dani Moncayo <dmoncayo@gmail.com>
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, Masatake YAMATO <yamato@redhat.com>, 
> 	Emacs development discussions <emacs-devel@gnu.org>
> 
> >> > OK, then Masatake, please commit your change.
> >>
> >> This isn't yet committed, is it?
> >
> > Yes, it is.  Type "M-x menu-bar-mode RET" and then press F10.
> 
> I tried it already, but I saw that the old tmm menu is shown, instead
> of the new drop-down menu.  Why?

That's what Masatake suggested, and everybody else agreed.



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-11 18:23               ` Eli Zaretskii
@ 2013-10-11 18:32                 ` Dani Moncayo
  2013-10-12  0:49                   ` Masatake YAMATO
  0 siblings, 1 reply; 24+ messages in thread
From: Dani Moncayo @ 2013-10-11 18:32 UTC (permalink / raw)
  To: Eli Zaretskii
  Cc: Emacs development discussions, Stefan Monnier, Masatake YAMATO

>> I tried it already, but I saw that the old tmm menu is shown, instead
>> of the new drop-down menu.  Why?
>
> That's what Masatake suggested, and everybody else agreed.

I interpreted Masatake's suggestion as "if menu-bar-mode is off, make
F10 show the _menu_ temporarily", while _menu_ would obviously refer
to the new drop-down menu, which is supposed to replace to the old tmm
menu.

BTW: I think that F10 should also close a tmm menu if there is one
open (currently it does nothing in that situation).

-- 
Dani Moncayo



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-11 18:32                 ` Dani Moncayo
@ 2013-10-12  0:49                   ` Masatake YAMATO
  2013-10-12  7:24                     ` Eli Zaretskii
  0 siblings, 1 reply; 24+ messages in thread
From: Masatake YAMATO @ 2013-10-12  0:49 UTC (permalink / raw)
  To: dmoncayo; +Cc: eliz, monnier, emacs-devel

>>> I tried it already, but I saw that the old tmm menu is shown, instead
>>> of the new drop-down menu.  Why?
>>
>> That's what Masatake suggested, and everybody else agreed.
> 
> I interpreted Masatake's suggestion as "if menu-bar-mode is off, make
> F10 show the _menu_ temporarily", while _menu_ would obviously refer
> to the new drop-down menu, which is supposed to replace to the old tmm
> menu.

If menu-bar-mode is off, making F10 show the drop-down menu temporarily
(or on-demand) is nice. However, I know how difficult(for me) to
implement such behavior because I tried it once for X11[1]. So I
prepared the patch using tmm as temporarily solution; and I installed 
the patch.

What we (you and I) want is Gregor Zattler suggested at [1].  However,
I didn't installed it to the official tree because, it is not my patch
and the expect behavior of on-demand drop-down menu is not discussed
enough. As far as reading your post you may have much detailed but 
important requests about the behavior.

Eli, in my interpretation, you don't object to introduce on-demand 
drop-down menu. However, you yourself doen't want it. Right?


[1] The last comment at
    http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00415.html
[2] http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00281.html


Masatake YAMATO

> BTW: I think that F10 should also close a tmm menu if there is one
> open (currently it does nothing in that situation).
> 
> -- 
> Dani Moncayo



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-12  0:49                   ` Masatake YAMATO
@ 2013-10-12  7:24                     ` Eli Zaretskii
  2013-10-12  9:34                       ` Dani Moncayo
  0 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2013-10-12  7:24 UTC (permalink / raw)
  To: Masatake YAMATO; +Cc: emacs-devel, monnier, dmoncayo

> Date: Sat, 12 Oct 2013 09:49:42 +0900 (JST)
> Cc: eliz@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org
> From: Masatake YAMATO <yamato@redhat.com>
> 
> What we (you and I) want is Gregor Zattler suggested at [1].  However,
> I didn't installed it to the official tree because, it is not my patch
> and the expect behavior of on-demand drop-down menu is not discussed
> enough. As far as reading your post you may have much detailed but 
> important requests about the behavior.

Indeed, no one responded to Gregor's suggestion, wrt whether this
should be the default Emacs behavior.

> Eli, in my interpretation, you don't object to introduce on-demand 
> drop-down menu. However, you yourself doen't want it. Right?

I always run with the menu bar enabled, so I wouldn't know what are
the expectations of people who do otherwise.  I don't object to
dropping menus by F10 even if the menu bar is not shown, provided it
is done for GUI sessions as well, for consistency, not just for
text-mode sessions.  Note that, at least for the TTY case, this
_requires_ to enable menu-bar-mode first, and disable it after the
user selects a menu item.



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

* Re: Drop-down menus, popup menus, and popup dialogs supported on TTYs
  2013-10-12  7:24                     ` Eli Zaretskii
@ 2013-10-12  9:34                       ` Dani Moncayo
  0 siblings, 0 replies; 24+ messages in thread
From: Dani Moncayo @ 2013-10-12  9:34 UTC (permalink / raw)
  To: Eli Zaretskii
  Cc: Emacs development discussions, Masatake YAMATO, Stefan Monnier

>> Eli, in my interpretation, you don't object to introduce on-demand
>> drop-down menu. However, you yourself doen't want it. Right?
>
> I always run with the menu bar enabled, so I wouldn't know what are
> the expectations of people who do otherwise.

I do otherwise.  See my expectations below.

> I don't object to
> dropping menus by F10 even if the menu bar is not shown, provided it
> is done for GUI sessions as well, for consistency, not just for
> text-mode sessions.

Agreed.  IMO, typing F10 in that case (GUI session with menu-bar-mode
off) should temporarily show the drop-down menu (which currently can
only be the toolkit menu, but in the future we might have a second
option: drop-down text menu).

>  Note that, at least for the TTY case, this
> _requires_ to enable menu-bar-mode first, and disable it after the
> user selects a menu item.

Exactly.  That's the behavior I'd like.

-- 
Dani Moncayo



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

end of thread, other threads:[~2013-10-12  9:34 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-08 18:24 Drop-down menus, popup menus, and popup dialogs supported on TTYs Eli Zaretskii
2013-10-08 20:18 ` chad
2013-10-09  2:42   ` Eli Zaretskii
2013-10-09  4:32 ` Masatake YAMATO
2013-10-09 16:35   ` Eli Zaretskii
2013-10-09 17:07     ` Dani Moncayo
2013-10-09 17:46     ` David De La Harpe Golden
2013-10-09 17:56     ` Gregor Zattler
2013-10-09 18:28       ` Eli Zaretskii
2013-10-09 21:26         ` Gregor Zattler
2013-10-10  2:49           ` Eli Zaretskii
2013-10-10  8:33             ` Gregor Zattler
2013-10-10  9:01               ` Andreas Schwab
2013-10-09 18:12     ` Stefan Monnier
2013-10-09 19:03       ` Eli Zaretskii
2013-10-11 17:01         ` Dani Moncayo
2013-10-11 17:46           ` Eli Zaretskii
2013-10-11 17:56             ` Dani Moncayo
2013-10-11 18:23               ` Eli Zaretskii
2013-10-11 18:32                 ` Dani Moncayo
2013-10-12  0:49                   ` Masatake YAMATO
2013-10-12  7:24                     ` Eli Zaretskii
2013-10-12  9:34                       ` Dani Moncayo
2013-10-11 18:06           ` Masatake YAMATO

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