How to set keyboard shortcut, wrong type argument: commandp? reddit / emacs ---------------------------------------------------------------------- maxle0312 · 2022-07-18 08:56 Hi all. I am using tabspaces: [https://github.com/mclear- tools/tabspaces](https://github.com/mclear-tools/tabspaces) I tried to set a custom shortcut for the command `tabspaces-switch-to- buffer`. I have this: (global-set-key (kbd "M-b") 'tabspaces-switch-to-buffer) and got the error: wrong type argument, commandp. This is weird because I bind the `tab-next` and `tab-previous` in exactly the same fashion. ​ (global-set-key (kbd "C-") 'tab-previous) (global-set-key (kbd "C-") 'tab-next) So I am not sure why it gives the error. The command when run via `M-x` works fine. ---------------------------------------------------------------------- whudwl · 2022-07-18 09:32 Maybe the package is not correctly loaded? After you've run it once with **M-x**, does **M-b** still say "wrong type argument, commandp"? ---------------------------------------------------------------------- maxle0312 · 2022-07-18 09:45 You are right. Silly me, the package was not loaded correctly. After running with M-x, the shortcut works. Thanks. ---------------------------------------------------------------------- wickeddrop · 2022-07-22 13:42 Tombwarrior97 I’m spending on running shoes