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

Key bindings fail to comply with minor mode conventions #1

Closed
swsnr opened this issue Apr 2, 2013 · 6 comments
Closed

Key bindings fail to comply with minor mode conventions #1

swsnr opened this issue Apr 2, 2013 · 6 comments

Comments

@swsnr
Copy link

swsnr commented Apr 2, 2013

According to the documentation, google-this-mode binds it's key map to C-x g which is against the key bindings conventions for minor modes, see Keymaps and Minor modes:

The key sequences bound in a minor mode should consist of C-c followed by one of .,/?`'"[]|~!#$%^&*()-_+=. (The other punctuation characters are reserved for major modes.)

This is also documented in Key Binding Conventions.

As far as I know, C-x is generally reserved for Emacs itself, and thus off limits to 3rd party libraries.

Please either change the default binding to a safe minor mode binding, or at least provide means to disable the standard binding to C-x g.

@ghost
Copy link

ghost commented Apr 5, 2013

I just submitted a pull request to map the default to C-c /. Hope it's ok for both of you :)

My fork here.

@Malabarba
Copy link
Owner

Thanks for the patch. Sorry for not responding sooner, I've been out of time lately.

Your help is appreciated. I'll accept the patch later today, I just want to edit the comments and the readme to reflect the change.

@swsnr
Copy link
Author

swsnr commented Apr 5, 2013

@bdsatish Thank you for patching this. C-c / is really a nice key binding for this.

@ldenman
Copy link

ldenman commented Nov 22, 2014

@lunaryorn @Bruce-Connor The keybinding "C-c /" conflicts with org-mode's keybinding for the "org-sparse-tree" function.
I have added this to my init.el:

;; Google This
(google-this-mode 1)
(global-set-key (kbd "C-x g") 'google-this-mode-submap)

"C-c /" is still bound to google-this-mode-submap. How would I get back the mapping to org-sparse-tree?

Thanks!

@Malabarba
Copy link
Owner

Instead of binding it manually, check out the variable google-this-keybind.

@ldenman
Copy link

ldenman commented Nov 22, 2014

@Bruce-Connor Perfect!

(setq google-this-keybind (kbd "C-x g"))
(google-this-mode 1)

Thanks for the useful plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants