1

In some cases [0/4]

  • Keybinding is too much!
  • Keybinding naming is not intuitive. like projectile-rails-console has keybinding [prefix + r].
  • Some keybindings naming will conflict under the intuitive principle. For example: projectile-rails-find-test, projectile-rails-find-template, [t].
  • Borrow the idea from helm: search, filter, narrow to one candidate.

So I want to create an emacs extension to do better job. For example, I have following keybindings bind to those commands.

    [C-c C-r r] -- projectile-rails-console
    [C-c C-r t] -- projectile-find-test
    [C-c C-r T] -- projectile-find-current-test
    []          -- projectile-goto-template-at-point

Below is a list of things I'd like to achieve:

  • UI Features
    • Borrow the idea from helm: search, filter, narrow to one candidate.
    • Borrow from “guide-key”, show the keybindings popup.
  • Core
    • When you input a prefix, like [C-c], then the extension start popup the following keybindings like “guide-key”, then user can continue press key just like normal use “guide-key”, but user also can type key like [tem], this will filter out keybindings which bind to command projectile-rails-goto-template etc.
    • I know I can archive this by directly use [M-x] to select command, but it is not intelligent, Emacs separated keybinding and command. I want to provide a smart way to do both in one place.
    • The big problem is how to let Emacs treat the following key input as search input, instead of continuing key press.

I created an github reposition at here: emacs-intelligent-key-guide.

Does anybody knows that is possible? And how? I need some hints. Thanks in advanced. And if you're interested in this project, welcome to contribute.

My real question is: How to treat following keybinding behind prefix map as normal input for searching commands?

closed as unclear what you're asking by Drew, erikstokes, Andrew Swann, itsjeyd, tarsius Jun 27 '15 at 20:12

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • This question risks being closed as unclear. Do not just post a URL to your real question and say "Go see this and tell me whether it is possible." If you want help here then pose a clear, specific question here. – Drew Jun 26 '15 at 23:21
  • I see, I will copy the real question to here. – stardiviner Jun 26 '15 at 23:37
  • Thanks. But taking a brief look at that page, you will need to pull a more specific question out of it to add here. As it stands now, it risks being closed as too broad. This is a Q&A site: specific questions & specific answers. – Drew Jun 26 '15 at 23:42
  • I don't know how to describe it, but I will try. – stardiviner Jun 26 '15 at 23:44
  • Thanks. The better you can help people understand what you need, the better the help you will get. – Drew Jun 26 '15 at 23:45
1

Try describe-buffer-bindings:

(with-current-buffer (get-buffer-create "result")
  (describe-buffer-bindings (current-buffer) (kbd "C-c") nil))

will insert list of key binds that use C-c as prefix in current buffer to result buffer.

By using this function, prefix ? (or prefix C-h) lists all key binds that start with prefix in the *Help* buffer, helm-descbinds even provides a helm interface for prefix ? i.e., type prefix ? and then search & select a command in helm.

P.S. Reading guide-key/helm-descbinds's source code to learn how they are implemented might be helpful since it seems like you want to make a helm interface for guide-key.

Not the answer you're looking for? Browse other questions tagged or ask your own question.