The problem is simply that you bound your command to [tab]
rather than to "\t"
. tab
denotes the TAB key under GUIs, but under a tty Emacs instead receives a TAB character (i.e. ?\t
), so when you hit tab
Emacs first looks for a tab
binding and if there isn't any, a function-key-map
remapping turns it into a ?\t
and tries again. The minibuffer only binds "\t"
, so any global binding to [tab]
will take precedence.
In short, use (global-set-key "\t" 'shift-right)
and this problem will disappear.