I run Emacs on Mac OSX, I'm trying to switch from Emacs for Mac OSX to Emacs Mac Port. I'm having some trouble with my keybindings.
For example, I'm trying to bind command-h to replace-string
.
(setq mac-command-modifier 'super)
(define-key key-minor-mode-map (kbd "s-h") 'replace-string)
This didn't work. So I tried binding it as hyper:
(define-hyper-key "h" 'replace-string)
but that didn't work either.
Changing other keybindings does seem to work (s-o
, s-p
, etc).
This may be related: How to bind "Hide Others" to a key "M-s-h" in railwaycat/emacs-mac-port?
command-h for replace-string
works on Emacs for Mac OSX, but on Emacs Mac Port, it just hides/minimizes the application window. Do keybindings work differently in Emacs Mac Port than they do on Emacs for Mac OSX? Are some keybindings hardcoded in to Emacs Mac Port, and if so, how can I override them?
Update: Looks like others are having the same issue. https://github.com/railwaycat/emacs-mac-port/issues/78
(define-key global-map [?\s-h] 'replace-string)
And, I have this for regular Emacs:(setq ns-command-modifier 'super)
– lawlist Aug 18 '15 at 2:49s-o
,s-p
, etc). – incandescentman Aug 18 '15 at 2:54C-h k s-h
and see if it registers, or perhaps the OSX is intercepting it? – lawlist Aug 18 '15 at 3:15