Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider enabling menu-bar by default for the benefit of new users #5669

Closed
gilch opened this issue Apr 4, 2016 · 11 comments
Closed

Consider enabling menu-bar by default for the benefit of new users #5669

gilch opened this issue Apr 4, 2016 · 11 comments
Labels
- Mailling list - stale marked as a stale issue/pr (usually by a bot)

Comments

@gilch
Copy link
Contributor

gilch commented Apr 4, 2016

Discoverability is one of the pillars of Spacemacs. The which-key package included by default helps a great deal on this point. However, it does not reveal the bindings for single-character commands, like f10 to use the menus. While this is a fairly standard key to invoke menus, it is a somewhat obscure one. (Most Windows users, for example, expect Alt to reveal a hidden menu, and when that doesn't work, won't think to try f10.)

For many commands a graphical menu is easier to search through than which-key, since backtracking requires a restart of the command, but the graphical menu doesn't. Some things available through the menus don't even have a keybinding. The menus also change with the modes, aiding discoverability of new features.

Emacs updates the menu text with the currently valid keybindings, including the SPC bindings, when applicable. This helps new the user to learn those bindings more quickly, since they can more easily find commands they've used from the menus before.

The buffer menu can help a vim user escape a non-evilified buffer (like Custom, see #5668), it also helps those unfamiliar with emacs understand how buffers work, since they're not so invisible given the buffer menu.

We would, of course, like new users to learn to use the keyboard shortcuts instead of relying on the mouse, but they have to discover them first. When a good keyboard-based alternative to a particular menu or menu item exists (like SPC b b for the buffer menu), consider appending a note of that to the relevant menu tooltip, and of course enable tooltips by default as well to make this possible.

@syl20bnr
Copy link
Owner

syl20bnr commented Apr 5, 2016

You have a point about discoverability but Spacemacs is a keyboard centric distribution. Is it possible to navigate the menu with the keyboard ? If no, is there a package to do it ? Something like which-key interface duplicating the menu and allowing the user to navigate with the keyboard.

@troyp
Copy link
Contributor

troyp commented Apr 5, 2016

Yes, you can use 'menu-bar-open ( by default) to access the menu
bar. There are also various libraries for menu navigation: See:
https://www.emacswiki.org/emacs/MenuAccessFromKeyboard

I think an important use of the menu is to simply identify the most
important commands for a major-mode and find their bindings. If there
are a lot of obscure commands, the menu can be a faster way to find
the essential functionality when you use a new mode.

On 4/5/16, Sylvain Benner notifications@github.com wrote:

You have a point about discoverability but Spacemacs is a keyboard centric
distribution. Is it possible to navigate the menu with the keyboard ? If no,
is there a package to do it ? Something like which-key interface duplicating
the menu and allowing the user to navigate with the keyboard.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#5669 (comment)

@gilch
Copy link
Contributor Author

gilch commented Apr 5, 2016

Yes, after activating the menu bar with F10, you can use the arrow keys to select an item and enter to activate it. Escape backtracks.

If that's not fast enough, you can also use the letter keys to quickly select a visible item based on the first letter of the item. This means the arrow keys are not really required. If there is more than one visible item with the same letter, typing the letter will cycle through the items starting with that letter, then you activate it with enter. For example, to save a buffer you could use <f10> f s RET, which will highlight the menu bar, activate the file menu, select the first item starting with "s" (Save SPC f s), and invoke it.

If that's still not fast enough, once you notice the keyboard shortcut displayed in the menu text (SPC f s in this case), you can learn to use that instead. If you forget, you can find it in the menu again.

@troyp
Copy link
Contributor

troyp commented Apr 5, 2016

LaCarte seems like a good option. You bind
'lacarte-execute-menu-command to a key and it gives you minibuffer
completion (with helm, if available) for menu items. The format is
like this:

Tools > Projectile > Find File (C-c p f)

If we could represent the menu as a keymap, we could use
'which-key-show-keymap to view it, but the helm interface is probably
better for this, anyway.

On 4/5/16, Troy Pracy troyp7@gmail.com wrote:

Yes, you can use 'menu-bar-open ( by default) to access the menu
bar. There are also various libraries for menu navigation: See:
https://www.emacswiki.org/emacs/MenuAccessFromKeyboard

I think an important use of the menu is to simply identify the most
important commands for a major-mode and find their bindings. If there
are a lot of obscure commands, the menu can be a faster way to find
the essential functionality when you use a new mode.

On 4/5/16, Sylvain Benner notifications@github.com wrote:

You have a point about discoverability but Spacemacs is a keyboard
centric
distribution. Is it possible to navigate the menu with the keyboard ? If
no,
is there a package to do it ? Something like which-key interface
duplicating
the menu and allowing the user to navigate with the keyboard.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#5669 (comment)

@nixmaniack
Copy link
Contributor

However, it does not reveal the bindings for single-character commands, like f10 to use the menus.

SPC h k shows top level keybindings using which-key which indeed shows f10 and others(you might have to page through). Is that what you're looking for?

@gilch
Copy link
Contributor Author

gilch commented Apr 5, 2016

Yeah I hadn't noticed that. SPC h k really should be mentioned in the quick start. Although SPC ? accomplishes most of this, it shows more than just the top level and therefore is even more to sort through during initial discovery.

Even given SPC h k, @troyp's point stands about using the menus to learn a new mode.

I've also noticed that enabling tooltips makes which-key much more useful. You can hover over the which-key window to see the documentation for each function displayed. Without tooltips you only get the first line on hover. This feature of which-key should also be mentioned in the quick start. When I first started learning through which-key I had to memorize the bindings I was interested in learning more about and look them up one at a time using SPC h d k. It didn't usually seem worth the effort.

@troyp
Copy link
Contributor

troyp commented Apr 6, 2016

Regarding which-key, keep in mind that you can use C-h u to "back
up" a level (remove the last keystroke in the sequence). So that's
another way to view the top-level bindings. It's also extremely useful
for "explorability": it let's you move up and down the which-key
display like a menu.

Also, you can use the function call (which-key-show kmap) to show a
which-key display of an arbitrary keymap, and
(which-key-show-keymap) to choose (with helm) a keymap for display.

It'd be nice if there was a special state available (from the C-h
paging/help menu) that lets you navigate the which-key display with
movement keys and and select commands to execute or to show
documentation for.

On 4/6/16, Matthew Egan Odendahl notifications@github.com wrote:

Yeah I hadn't noticed that. SPC h k really should be mentioned in the
quick start. Although SPC ?
accomplishes most of this, it shows more than just the top level and
therefore is even more to sort through during initial discovery.

Even given SPC h k, @troyp's point stands about using the menus to learn a
new mode.

I've also noticed that enabling tooltips make which-key much more useful.
You can hover over the which-key window to see the documentation for each
function displayed. Without tooltips you only get the first line on hover.
This feature of which-key should also be mentioned in the quick start. When
I first started learning through which-key I had to memorize the bindings I
was interested in learning more about and look them up one at a time using
SPC h d k. It didn't usually seem worth the effort.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#5669 (comment)

@ghost
Copy link

ghost commented Aug 16, 2016

I am glad Spacemacs disables the menu-bar by default.* It helped me, as someone new to Spacemacs, to learn Spacemacs keyboard commands, which I've found to be much more efficient than using the menu-bar ever was for me in plain GNU Emacs.

*Update 2017-12-15: However, I can see that access to the menu-bar would potentially be very helpful for some users, e.g. per these comments from @terrycloth and @samuraijack : 1, 2.

I would therefore suggest that either of these two options is used for closing this issue:

  • Close as WONTFIX.
  • Improve the discoverability of the menu-bar, but without enabling it by default. This way, any new Spacemacs user really craving a menu-bar would be able to find it readily, but in all other respects Spacemacs would preserve its excellent approach of encouraging ergonomic keyboard use and discouraging GUI dependency.

* Thank you, Sylvain!

@audreytoskin
Copy link

Improve the discoverability of the menu-bar, but without enabling it by default

We're sort of there, I guess... SPC T reveals the "UI Toggles/Themes" menu, which can then toggle the menu bar (for the current session). T is the 28th of 36 menu entries on first pressing SPC, though --- it's more more discoverable than vanilla Vim, but was still just a little bit intimidating for me as a brand new user.

I am glad Spacemacs disables the menu-bar by default.* It helped me, as someone new to Spacemacs, to learn Spacemacs keyboard commands [...]

Never allowing yourself to use "training wheels" is certainly one way to do it. Spacemacs is such a drastically different UI design philosophy from most modern editors, though, that it's tough to learn how to use it while also trying to do real work. Going without training wheels may require you to learn the keyboard navigation faster, but during that time would also be a bigger slow-down for any work you're doing --- so there's a trade-off.

Consider this, then, too: Having the menu bar enabled is also helpful for learning keyboard commands, because you can see them right there in the menus.

I personally like the idea of enabling the menu bar by default, but even if the Spacemacs team decided against doing this, I would hope it's for some other reason: Forcing new users to learn things the hard way doesn't seem like a great UI design principle, IMHO. Spacemacs uses the UI that it does not because it's hard but because it's effective, once you get used to it, and users should be able to consider the range of online and offline documentation, the tutorials, the spacebar menus, and the menu bar and any other training-wheel-like features and decide for themselves how they want to approach learning.

In that light, I think this thread deserves to be considered an actual feature request (labeled as something other than Mailing list), which can then be denied if the developers choose, or implemented when an interested volunteer finds the time to make it happen.

@canonic-epicure
Copy link

canonic-epicure commented Aug 14, 2017

Real world case.

I'm a total emacs newbie. I'll be honest - I hate it. I would never use it, but it seems to have the best support for haskell, so not much choice.

Anyway, I was struggling to realize how do I find the file in the project by partial match. And after I've enabled the menu - I found it in 1 min, just exploring the "Tools -> Projectile" section.

I think the philosophy should be "give powerful commands/customizations to user", not "force the user to learn 100 new things". If user like the command he will assign his own shortcut to it - thats not a main point of being productive.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- Mailling list - stale marked as a stale issue/pr (usually by a bot)
Projects
Mailing list
  
Other
Development

No branches or pull requests

7 participants