* F10 → menu @ 2017-05-25 3:11 Jean-Christophe Helary 2017-05-25 5:25 ` Alexis 2017-05-25 15:05 ` Eli Zaretskii 0 siblings, 2 replies; 16+ messages in thread From: Jean-Christophe Helary @ 2017-05-25 3:11 UTC (permalink / raw) To: help-gnu-emacs I don't remember what I did but at some point last week every time I hit F10 I had a graphical collapsed menu that was displayed at the top left of the frame (on OSX). And then I probably did something (uninstall a package or whatnot) and now the behavior is back to the bottom buffer displaying the menus. I really liked that thing. Can anybody tell me how to have it back? Jean-Christophe ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: F10 → menu 2017-05-25 3:11 F10 → menu Jean-Christophe Helary @ 2017-05-25 5:25 ` Alexis 2017-05-25 5:42 ` Jean-Christophe Helary 2017-05-25 15:05 ` Eli Zaretskii 1 sibling, 1 reply; 16+ messages in thread From: Alexis @ 2017-05-25 5:25 UTC (permalink / raw) To: Jean-Christophe Helary; +Cc: help-gnu-emacs Jean-Christophe Helary <jean.christophe.helary@gmail.com> writes: > I don't remember what I did but at some point last week every > time I > hit F10 I had a graphical collapsed menu that was displayed at > the top > left of the frame (on OSX). And then I probably did something > (uninstall a package or whatnot) and now the behavior is back to > the > bottom buffer displaying the menus. The latter, at least, sounds to me like `tmm-menubar` being enabled: Text-mode emulation of looking and choosing from a menubar. See the documentation for ‘tmm-prompt’. X-POSITION, if non-nil, specifies a horizontal position within the menu bar; we make that menu bar item (the one at that position) the default choice. Note that <f10> by default drops down TTY menus; if you want it to invoke ‘tmm-menubar’ instead, customize the variable ‘tty-menu-open-use-tmm’ to a non-nil value. Alexis. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: F10 → menu 2017-05-25 5:25 ` Alexis @ 2017-05-25 5:42 ` Jean-Christophe Helary 2017-05-25 5:54 ` Alexis 0 siblings, 1 reply; 16+ messages in thread From: Jean-Christophe Helary @ 2017-05-25 5:42 UTC (permalink / raw) To: help-gnu-emacs Alexis, Indeed, that's tmm-menu, and I thought it was the default way to display the menu after hitting F10. So that other way to display the menu, in a very GUI-esque hovering small widget where all the menus are collapsed and you access them like in tmm, with the keys, or eventually with the mouse, is what I'm looking for. Jean-Christophe > On May 25, 2017, at 14:25, Alexis <flexibeast@gmail.com> wrote: > > > Jean-Christophe Helary <jean.christophe.helary@gmail.com> writes: > >> I don't remember what I did but at some point last week every time I >> hit F10 I had a graphical collapsed menu that was displayed at the top >> left of the frame (on OSX). And then I probably did something >> (uninstall a package or whatnot) and now the behavior is back to the >> bottom buffer displaying the menus. > > The latter, at least, sounds to me like `tmm-menubar` being enabled: > > Text-mode emulation of looking and choosing from a menubar. See the > documentation for ‘tmm-prompt’. > X-POSITION, if non-nil, specifies a horizontal position within the > menu bar; we make that menu bar item (the one at that position) the > default choice. > > Note that <f10> by default drops down TTY menus; if you want it > to invoke ‘tmm-menubar’ instead, customize the variable > ‘tty-menu-open-use-tmm’ to a non-nil value. > > > Alexis. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: F10 → menu 2017-05-25 5:42 ` Jean-Christophe Helary @ 2017-05-25 5:54 ` Alexis 0 siblings, 0 replies; 16+ messages in thread From: Alexis @ 2017-05-25 5:54 UTC (permalink / raw) To: Jean-Christophe Helary; +Cc: help-gnu-emacs Jean-Christophe Helary <jean.christophe.helary@gmail.com> writes: > Indeed, that's tmm-menu, and I thought it was the default way to > display the menu after hitting F10. So that other way to > display the > menu, in a very GUI-esque hovering small widget where all the > menus > are collapsed and you access them like in tmm, with the keys, or > eventually with the mouse, is what I'm looking for. Well, my thought was that maybe /disabling/ `tmm-menu` might do the trick? Certainly for me, when i don't have `tmm-menu` enabled, i get the behaviour you describe .... Alexis. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: F10 → menu 2017-05-25 3:11 F10 → menu Jean-Christophe Helary 2017-05-25 5:25 ` Alexis @ 2017-05-25 15:05 ` Eli Zaretskii 2017-05-28 10:02 ` Jean-Christophe Helary 1 sibling, 1 reply; 16+ messages in thread From: Eli Zaretskii @ 2017-05-25 15:05 UTC (permalink / raw) To: help-gnu-emacs > From: Jean-Christophe Helary <jean.christophe.helary@gmail.com> > Date: Thu, 25 May 2017 12:11:44 +0900 > > I don't remember what I did but at some point last week every time I hit F10 I had a graphical collapsed menu that was displayed at the top left of the frame (on OSX). And then I probably did something (uninstall a package or whatnot) and now the behavior is back to the bottom buffer displaying the menus. > > I really liked that thing. Can anybody tell me how to have it back? If that was on a text-mode frame, check the value of tty-menu-open-use-tmm; it should be nil to get the drop-down menus. If that was on a GUI frame, perhaps you've inadvertently loaded tmm? Try unloading it, or restart the Emacs session. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: F10 → menu 2017-05-25 15:05 ` Eli Zaretskii @ 2017-05-28 10:02 ` Jean-Christophe Helary 2017-05-28 11:46 ` John Ankarström 2017-05-28 12:57 ` Jean-Christophe Helary 0 siblings, 2 replies; 16+ messages in thread From: Jean-Christophe Helary @ 2017-05-28 10:02 UTC (permalink / raw) To: help-gnu-emacs > On May 26, 2017, at 0:05, Eli Zaretskii <eliz@gnu.org> wrote: > >> From: Jean-Christophe Helary <jean.christophe.helary@gmail.com> >> Date: Thu, 25 May 2017 12:11:44 +0900 >> >> I don't remember what I did but at some point last week every time I hit F10 I had a graphical collapsed menu that was displayed at the top left of the frame (on OSX). And then I probably did something (uninstall a package or whatnot) and now the behavior is back to the bottom buffer displaying the menus. >> >> I really liked that thing. Can anybody tell me how to have it back? > > If that was on a text-mode frame, check the value of > tty-menu-open-use-tmm; it should be nil to get the drop-down menus. > > If that was on a GUI frame, perhaps you've inadvertently loaded tmm? > Try unloading it, or restart the Emacs session. I think I found what ai was looking for. It was probably an x-popup-menu associated to the menu-bar and installed in a file that I had copied from somewhere and probably removed a short while after. I found a similar setting today: (define-key global-map (kbd "C-<f2>") (lambda () (interactive) (x-popup-menu (list '(0 0) (selected-frame)) (mouse-menu-bar-map)))) Jean-Christophe ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: F10 → menu 2017-05-28 10:02 ` Jean-Christophe Helary @ 2017-05-28 11:46 ` John Ankarström 2017-05-28 12:50 ` Jean-Christophe Helary 2017-05-28 12:57 ` Jean-Christophe Helary 1 sibling, 1 reply; 16+ messages in thread From: John Ankarström @ 2017-05-28 11:46 UTC (permalink / raw) To: Jean-Christophe Helary; +Cc: help-gnu-emacs Jean-Christophe Helary <jean.christophe.helary@gmail.com> writes: > I found a similar setting today: > > (define-key global-map (kbd "C-<f2>") > (lambda () > (interactive) > (x-popup-menu (list '(0 0) (selected-frame)) > (mouse-menu-bar-map)))) This does the same thing as <C-down-mouse-3> (control + right-click) for me. But maybe the original function you looked for did something more. In any case, I learned about `x-popup-menu' :-) - John ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: F10 → menu 2017-05-28 11:46 ` John Ankarström @ 2017-05-28 12:50 ` Jean-Christophe Helary 0 siblings, 0 replies; 16+ messages in thread From: Jean-Christophe Helary @ 2017-05-28 12:50 UTC (permalink / raw) To: help-gnu-emacs > On May 28, 2017, at 20:46, John Ankarström <john@ankarstrom.se> wrote: > >> (define-key global-map (kbd "C-<f2>") >> (lambda () >> (interactive) >> (x-popup-menu (list '(0 0) (selected-frame)) >> (mouse-menu-bar-map)))) > > This does the same thing as <C-down-mouse-3> (control + > right-click) for me. But maybe the original function you looked > for did something more. > > In any case, I learned about `x-popup-menu' :-) yep, that's neat isn't it ? :) Jean-Christophe ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: F10 → menu 2017-05-28 10:02 ` Jean-Christophe Helary 2017-05-28 11:46 ` John Ankarström @ 2017-05-28 12:57 ` Jean-Christophe Helary 2017-05-28 13:24 ` John Ankarström 1 sibling, 1 reply; 16+ messages in thread From: Jean-Christophe Helary @ 2017-05-28 12:57 UTC (permalink / raw) To: help-gnu-emacs > I found a similar setting today: > > (define-key global-map (kbd "C-<f2>") > (lambda () > (interactive) > (x-popup-menu (list '(0 0) (selected-frame)) > (mouse-menu-bar-map)))) Weird, none of the menu item trigger anything regardless of whether I use only the keyboard or if I use the mouse. Only calling the items from the real menus does trigger something... Jean-Christophe ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: F10 → menu 2017-05-28 12:57 ` Jean-Christophe Helary @ 2017-05-28 13:24 ` John Ankarström 2017-05-28 13:55 ` Jean-Christophe Helary 0 siblings, 1 reply; 16+ messages in thread From: John Ankarström @ 2017-05-28 13:24 UTC (permalink / raw) To: Jean-Christophe Helary; +Cc: help-gnu-emacs Jean-Christophe Helary <jean.christophe.helary@gmail.com> writes: >> I found a similar setting today: >> >> (define-key global-map (kbd "C-<f2>") >> (lambda () >> (interactive) >> (x-popup-menu (list '(0 0) (selected-frame)) >> (mouse-menu-bar-map)))) > > Weird, none of the menu item trigger anything regardless of whether I use only > the keyboard or if I use the mouse. > Only calling the items from the real menus does trigger something... I looked at the documentation for `x-popup-menu': > Pop up a deck-of-cards menu and return user’s selection. <C-f2>, as defined above, would only return the user's selection without executing it. For example, when selecting Help > Emacs Tutorial, the following is returned: > (help-menu emacs-tutorial) I'm not sure on how you'd go about executing that, but I'm sure there's a way. - John ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: F10 → menu 2017-05-28 13:24 ` John Ankarström @ 2017-05-28 13:55 ` Jean-Christophe Helary 2017-05-28 14:33 ` John Ankarström 0 siblings, 1 reply; 16+ messages in thread From: Jean-Christophe Helary @ 2017-05-28 13:55 UTC (permalink / raw) To: help-gnu-emacs > On May 28, 2017, at 22:24, John Ankarström <john@ankarstrom.se> wrote: > I looked at the documentation for `x-popup-menu': > >> Pop up a deck-of-cards menu and return user’s selection. > > <C-f2>, as defined above, would only return the user's selection > without executing it. For example, when selecting Help > Emacs > Tutorial, the following is returned: > >> (help-menu emacs-tutorial) > > I'm not sure on how you'd go about executing that, but I'm sure > there's a way. Ok, I feel better :) I just need to investigate that, it's not a problem with my system... Thank you. Jean-Christophe ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: F10 → menu 2017-05-28 13:55 ` Jean-Christophe Helary @ 2017-05-28 14:33 ` John Ankarström 2017-05-28 14:42 ` Jean-Christophe Helary 0 siblings, 1 reply; 16+ messages in thread From: John Ankarström @ 2017-05-28 14:33 UTC (permalink / raw) To: Jean-Christophe Helary; +Cc: help-gnu-emacs Jean-Christophe Helary <jean.christophe.helary@gmail.com> writes: >> On May 28, 2017, at 22:24, John Ankarström <john@ankarstrom.se> wrote: > >> I looked at the documentation for `x-popup-menu': >> >>> Pop up a deck-of-cards menu and return user’s selection. >> >> <C-f2>, as defined above, would only return the user's >> selection without executing it. For example, when selecting >> Help > Emacs Tutorial, the following is returned: >> >>> (help-menu emacs-tutorial) >> >> I'm not sure on how you'd go about executing that, but I'm >> sure there's a way. > > Ok, I feel better :) I just need to investigate that, it's not > a problem with my system... I took a look at the source for `x-menu-bar-open', which is the function called by `menu-bar-open' (<C-down-mouse-3>): --8<---------------cut here---------------start------------->8--- (defun x-menu-bar-open (&optional frame) "Open the menu bar if it is shown. `popup-menu' is used if it is off." (interactive "i") (cond ((and (not (zerop (or (frame-parameter nil 'menu-bar-lines) 0))) (fboundp 'accelerate-menu)) (accelerate-menu frame)) (t (popup-menu (mouse-menu-bar-map) last-nonmenu-event)))) --8<---------------cut here---------------end--------------->8--- It calls `popup-menu', which seems to do the pretty much the same thing as `x-popup-menu', but instead of just returning the selected item, it executes it: > Popup the given menu and call the selected option. Thus, to achieve the functionality you want (which seems to be opening the menu in the top-left corner of the window?), the following function would do it: --8<---------------cut here---------------start------------->8--- (defun menu-bar-open-top-left () (interactive) (popup-menu (mouse-menu-bar-map) (list '(0 0) (selected-frame)))) (global-set-key (kbd "<C-f2>") #'menu-bar-open-top-left) --8<---------------cut here---------------end--------------->8--- Hope that works for you. - John ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: F10 → menu 2017-05-28 14:33 ` John Ankarström @ 2017-05-28 14:42 ` Jean-Christophe Helary 2017-05-28 14:54 ` John Ankarström 0 siblings, 1 reply; 16+ messages in thread From: Jean-Christophe Helary @ 2017-05-28 14:42 UTC (permalink / raw) To: help-gnu-emacs > On May 28, 2017, at 23:33, John Ankarström <john@ankarstrom.se> wrote: > > Thus, to achieve the functionality you want (which seems to be > opening the menu in the top-left corner of the window?), the > following function would do it: > > --8<---------------cut here---------------start------------->8--- > (defun menu-bar-open-top-left () > (interactive) > (popup-menu (mouse-menu-bar-map) (list '(0 0) (selected-frame)))) > > (global-set-key (kbd "<C-f2>") #'menu-bar-open-top-left) > --8<---------------cut here---------------end--------------->8--- > > Hope that works for you. It definitely does. Thank you very much. It's already late here, but I think I'll be checking how to use that instead of the right-click contextual menu that only displays opened buffers. Jean-Christophe ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: F10 → menu 2017-05-28 14:42 ` Jean-Christophe Helary @ 2017-05-28 14:54 ` John Ankarström 2017-05-28 15:00 ` Jean-Christophe Helary 0 siblings, 1 reply; 16+ messages in thread From: John Ankarström @ 2017-05-28 14:54 UTC (permalink / raw) To: Jean-Christophe Helary; +Cc: help-gnu-emacs Jean-Christophe Helary <jean.christophe.helary@gmail.com> writes: > It definitely does. Thank you very much. Glad you're happy! > It's already late here, but I think I'll be checking how to use that instead of > the right-click contextual menu that only displays opened buffers. I think you're confusing the two different "key" bindings: for me, control + left-click opens the "Buffer Menu" you describe (mouse-buffer-menu), while control + right-click opens the real menu, at the position of the cursor. From looking at (describe-key (kbd "<C-mouse-down-3>")), it seems that latter "key" binding doesn't seem to be bound to an actual function. I'm not sure. - JOhn ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: F10 → menu 2017-05-28 14:54 ` John Ankarström @ 2017-05-28 15:00 ` Jean-Christophe Helary 2017-05-28 15:18 ` John Ankarström 0 siblings, 1 reply; 16+ messages in thread From: Jean-Christophe Helary @ 2017-05-28 15:00 UTC (permalink / raw) To: help-gnu-emacs > On May 28, 2017, at 23:54, John Ankarström <john@ankarstrom.se> wrote: >> It's already late here, but I think I'll be checking how to use that instead of >> the right-click contextual menu that only displays opened buffers. > > I think you're confusing the two different "key" bindings: for > me, control + left-click opens the "Buffer Menu" you describe > (mouse-buffer-menu), while control + right-click opens the real > menu, at the position of the cursor. I'm on a MacBook Pro with a trackpad, so C-click is right-click and triggers the buffer menu (mouse-buffer-menu → C-down-mouse-1). And I can't do C-right-click. The click is a left click by default. But now, I see I can bind that C-click to the function you just defined... :) Jean-Christophe ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: F10 → menu 2017-05-28 15:00 ` Jean-Christophe Helary @ 2017-05-28 15:18 ` John Ankarström 0 siblings, 0 replies; 16+ messages in thread From: John Ankarström @ 2017-05-28 15:18 UTC (permalink / raw) To: Jean-Christophe Helary; +Cc: help-gnu-emacs Jean-Christophe Helary <jean.christophe.helary@gmail.com> writes: > I'm on a MacBook Pro with a trackpad, so C-click is right-click and triggers the > buffer menu (mouse-buffer-menu → C-down-mouse-1). And I can't do C-right-click. > The click is a left click by default. > > But now, I see I can bind that C-click to the function you just defined... :) Ah, I see. I remember that from using a Mac. If you want to have the menu show up at the position of the mouse cursor (like <C-down-mouse-3>), just remove the explicit position from the call to `popup-menu': --8<---------------cut here---------------start------------->8--- (defun mouse-menu-bar-open () (interactive) (popup-menu (mouse-menu-bar-map))) (global-set-key (kbd "<C-S-down-mouse-1>") #'mouse-menu-bar-open) --8<---------------cut here---------------end--------------->8--- Above I set that to control + shift + left-click, but again, maybe on a Mac trackpad that would be <S-down-mouse-3>. - John ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2017-05-28 15:18 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-05-25 3:11 F10 → menu Jean-Christophe Helary 2017-05-25 5:25 ` Alexis 2017-05-25 5:42 ` Jean-Christophe Helary 2017-05-25 5:54 ` Alexis 2017-05-25 15:05 ` Eli Zaretskii 2017-05-28 10:02 ` Jean-Christophe Helary 2017-05-28 11:46 ` John Ankarström 2017-05-28 12:50 ` Jean-Christophe Helary 2017-05-28 12:57 ` Jean-Christophe Helary 2017-05-28 13:24 ` John Ankarström 2017-05-28 13:55 ` Jean-Christophe Helary 2017-05-28 14:33 ` John Ankarström 2017-05-28 14:42 ` Jean-Christophe Helary 2017-05-28 14:54 ` John Ankarström 2017-05-28 15:00 ` Jean-Christophe Helary 2017-05-28 15:18 ` John Ankarström
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).