vermiculus / sx.el

Stack Exchange for Emacs
http://stackapps.com/q/3950
709 stars 40 forks source link

'switch-to' binding does not work #280

Closed kaushalmodi closed 9 years ago

kaushalmodi commented 9 years ago

I tried using the s binding to use the 'switch-to' feature but it does not work.

While in the All-Questions buffer for emacs.SE, I hit sa and I got this in the Messages buffer:

s a is undefined

The value of sx-question-list--site is "emacs"

So the below should have bound s key

(sx--define-conditional-key sx-switchto-map "s" #'sx-question-list-switch-site
  (and (boundp 'sx-question-list--site) sx-question-list--site))

But when I do s?, I get:

Major Mode Bindings Starting With s:
key             binding
---             -------

Global Bindings Starting With s:
key             binding
---             -------

Also s is not totally unbound; Discover my Major package tells that it is bound as a prefix command

s: Prefix command (definition is a keymap associating keystrokes with commands).

So when I do C-h k s, emacs is waiting for me to enter a key in that prefix map (which I know of none). When I tried C-h k s a, I got

s a is undefined

Malabarba commented 9 years ago

The s prefix map does need some sort of visual feedback. I think using @abo-abo 's hydra is in order.

As for your actual issue... You should be able to switch site with s s, does that not work?

kaushalmodi commented 9 years ago

No, s s is also undefined.

Malabarba commented 9 years ago

Should be fixed now.

kaushalmodi commented 9 years ago

Thanks! It's fixed now.