purcell / envrc

Emacs support for direnv which operates buffer-locally
378 stars 35 forks source link

Update to use prefix-based key map (hopefully makes customizing key bindings easier) #5

Closed swflint closed 4 years ago

swflint commented 4 years ago

The currently selected key bindings interfere with a number of things, including org-export (org-export-dispatch), if the global minor mode is used. This change lets a user switch prefix easily (before loading the package).

purcell commented 4 years ago

including org-export (org-export-dispatch),

Good to know, thanks -- I didn't really audit the bindings before selecting them. Also happy to change the default prefix if you have a suggestion.

purcell commented 4 years ago

I note that projectile, for example, has moved away from providing a "prefix" custom var in favour of telling people to bind keys directly:

(defcustom projectile-keymap-prefix nil
  "Projectile keymap prefix."
  :group 'projectile
  :type 'string)

(make-obsolete-variable 'projectile-keymap-prefix "Use (define-key projectile-mode-map (kbd ...) 'projectile-command-map) instead." "2.0.0")

So maybe I should just do that, and let people use whatever prefix they like...

swflint commented 4 years ago

I don't know if that would be my preference, but it would probably be the better option.

purcell commented 4 years ago

Done in 60c5bbf. Thanks for your help!

purcell commented 4 years ago

C-c $ would be quite a nicely mnemonic default tbh. :)