* Why is M-; not showing up in <lang-mode> C-h m help? @ 2013-10-29 17:04 Sivaram Neelakantan 2013-10-30 12:00 ` Michael Heerdegen 2013-10-30 21:39 ` Jambunathan K 0 siblings, 2 replies; 6+ messages in thread From: Sivaram Neelakantan @ 2013-10-29 17:04 UTC (permalink / raw) To: help-gnu-emacs I just noticed that M-; (comment-dwim) does not show in C-h m for the language/source code one is writing the script for. Why is that? In sh-mode,python mode it's not there at all. Given that commenting/uncommenting is fairly common task in source editing, shouldn't the key map be part of the mode help too? It does show up under C-h k but that's irrelevant to a new user of a language-mode. I only noticed this now because of a post in comp.Emacs from someone asking for help on commenting. sivaram -- ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Why is M-; not showing up in <lang-mode> C-h m help? 2013-10-29 17:04 Why is M-; not showing up in <lang-mode> C-h m help? Sivaram Neelakantan @ 2013-10-30 12:00 ` Michael Heerdegen 2013-10-30 18:38 ` Sivaram Neelakantan 2013-10-30 21:39 ` Jambunathan K 1 sibling, 1 reply; 6+ messages in thread From: Michael Heerdegen @ 2013-10-30 12:00 UTC (permalink / raw) To: help-gnu-emacs Sivaram Neelakantan <nsivaram.net@gmail.com> writes: > I just noticed that M-; (comment-dwim) does not show in C-h m for the > language/source code one is writing the script for. Why is that? In > sh-mode,python mode it's not there at all. Given that > commenting/uncommenting is fairly common task in source editing, > shouldn't the key map be part of the mode help too? > > It does show up under C-h k but that's irrelevant to a new user of a > language-mode. The binding is not mode specific, it's defined in the `global-map'. With other words, there are no different `comment-dwim' commands for every major mode, there is only one general `comment-dwim' working for all correctly defined major modes. C-h m describes only mode specific bindings; that's why the binding doesn't show up there. Regards, Michael. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Why is M-; not showing up in <lang-mode> C-h m help? 2013-10-30 12:00 ` Michael Heerdegen @ 2013-10-30 18:38 ` Sivaram Neelakantan 2013-10-30 21:17 ` Kai Großjohann 0 siblings, 1 reply; 6+ messages in thread From: Sivaram Neelakantan @ 2013-10-30 18:38 UTC (permalink / raw) To: help-gnu-emacs On Wed, Oct 30 2013,Michael Heerdegen wrote: [snipped 11 lines] > The binding is not mode specific, it's defined in the `global-map'. > With other words, there are no different `comment-dwim' commands for > every major mode, there is only one general `comment-dwim' working for > all correctly defined major modes. > > C-h m describes only mode specific bindings; that's why the binding > doesn't show up there. > well, wouldn't a reasonable subset of the global keymap be made part of the local mode? Someone starting off on Emacs wouldn't know at all, would they? sivaram -- ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Why is M-; not showing up in <lang-mode> C-h m help? 2013-10-30 18:38 ` Sivaram Neelakantan @ 2013-10-30 21:17 ` Kai Großjohann 0 siblings, 0 replies; 6+ messages in thread From: Kai Großjohann @ 2013-10-30 21:17 UTC (permalink / raw) To: help-gnu-emacs; +Cc: help-gnu-emacs Sivaram Neelakantan wrote: > On Wed, Oct 30 2013,Michael Heerdegen wrote: > > > [snipped 11 lines] > >> The binding is not mode specific, it's defined in the `global-map'. >> With other words, there are no different `comment-dwim' commands for >> every major mode, there is only one general `comment-dwim' working for >> all correctly defined major modes. >> >> C-h m describes only mode specific bindings; that's why the binding >> doesn't show up there. >> > > well, wouldn't a reasonable subset of the global keymap be made part of > the local mode? Someone starting off on Emacs wouldn't know at all, > would they? On the one hand, yes. On the other hand, you don't want to show <right> and <left> in the output of C-h m. So it's hard to find the right boundary. Kai ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Why is M-; not showing up in <lang-mode> C-h m help? 2013-10-29 17:04 Why is M-; not showing up in <lang-mode> C-h m help? Sivaram Neelakantan 2013-10-30 12:00 ` Michael Heerdegen @ 2013-10-30 21:39 ` Jambunathan K 2013-10-30 22:14 ` Drew Adams 1 sibling, 1 reply; 6+ messages in thread From: Jambunathan K @ 2013-10-30 21:39 UTC (permalink / raw) To: Sivaram Neelakantan; +Cc: help-gnu-emacs While in cperl-mode, I do see that the Perl Menu shows "generic" (i.e., non-perl specific but applicable to any programming in general) items. I do see a "comment region" there but not a key binding being recommended. I recommend doing a M-x report-emacs-bug RET Btw, C-h b (and searching for comment or whatever you are looking for) is much easier and complete than doing a C-h m. Sivaram Neelakantan <nsivaram.net@gmail.com> writes: > I just noticed that M-; (comment-dwim) does not show in C-h m for the > language/source code one is writing the script for. Why is that? In > sh-mode,python mode it's not there at all. Given that > commenting/uncommenting is fairly common task in source editing, > shouldn't the key map be part of the mode help too? > > It does show up under C-h k but that's irrelevant to a new user of a > language-mode. > > I only noticed this now because of a post in comp.Emacs from someone > asking for help on commenting. > > sivaram > -- ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Why is M-; not showing up in <lang-mode> C-h m help? 2013-10-30 21:39 ` Jambunathan K @ 2013-10-30 22:14 ` Drew Adams 0 siblings, 0 replies; 6+ messages in thread From: Drew Adams @ 2013-10-30 22:14 UTC (permalink / raw) To: Jambunathan K, Sivaram Neelakantan; +Cc: help-gnu-emacs FWIW, with Icicles key completion (`S-TAB') you get the entire set of current key bindings, organdized hierarchically by prefix keys. This includes the menu-bar menus. (If you use library `tool-bar+.el' then you even have access to the tool-bar "keys" - aka buttons.) All of the keys and their associated commands are visible as completion candidates in *Completions*. And all of their doc strings are available by cycling using `C-M-down' or by clicking `C-mouse2' on candidates in *Completions*. If you know the key prefix you want, you can hit that first and then use `S-TAB' to see the keys with that prefix, etc. Your minibuffer input filters the set of candidates, of course. You can filter by key name or command name or both. You can browse & cycle among the matching candidates. You can use multiple patterns (separated by `S-SPC') for this filtering (progressive completion). A lot better than `C-h b'. And it's not just for help. Choosing a complete candidate invokes its command. http://www.emacswiki.org/emacs/Icicles_-_Key_Completion `C-h k S-TAB' tells you this: ,---- | Complete a key sequence for the currently invoked prefix key. | Input-candidate completion and cycling are available. | | By default, key completion is case insensitive. As always, you can | use `C-A' to toggle case sensitivity. | | You can navigate the key-binding hierarchy (prefix-key hierarchy), | just as would navigate a file-system hierarchy (to complete directory | and file names) or a menu hierarchy (to complete submenu and menu-item | names). | | Completion candidates generally have the form `KEY = COMMAND'. | | If COMMAND is `...', then KEY is a prefix key; choosing it updates the | completion candidates list to the keys under that prefix. For | example, choosing `C-x = ...' changes the candidates to those with | prefix `C-x'. | | The special candidate `..' means to go up one level of the key-binding | hierarchy and complete candidates there. For example, if you are | currently completing prefix key `C-x 5', and you choose candidate | `..', then you will be completing prefix `C-x', the parent of `C-x 5'. | | Except at the top level, the default value for completion is `..'. | | You can use `C-M-,' at any time to switch between sorting with local | bindings first and sorting with prefix keys first. You can use `C-,' | at any time to change the sort order among these two and sorting by | command name. | ... | While cycling, these keys describe candidates: | | `C-RET' - Describe command of current completion candidate only | `C-down' - Move to next completion candidate and describe | `C-up' - Move to previous completion candidate and describe ... | `C-!' - Describe *all* candidates (or all that are saved), | successively - use the [back] button in buffer *Help* to | visit the descriptions ... | With prefix `C-M-' instead of `C-', the same keys (`C-M-mouse-2', | `C-M-down', and so on) provide help about candidates. | | Use `mouse-2', `RET', or `S-RET' to finally choose a candidate, or | `C-g' to quit. This is an Icicles command - see command | `icicle-mode'. `---- ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-10-30 22:14 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-10-29 17:04 Why is M-; not showing up in <lang-mode> C-h m help? Sivaram Neelakantan 2013-10-30 12:00 ` Michael Heerdegen 2013-10-30 18:38 ` Sivaram Neelakantan 2013-10-30 21:17 ` Kai Großjohann 2013-10-30 21:39 ` Jambunathan K 2013-10-30 22:14 ` Drew Adams
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).