A simple Emacs interface for Spotify that makes good use of helm.
See how the first version was coded in 16 minutes.
If you’re hooked up to MELPA:
M-x package-refresh-contents M-x package-install RET helm-spotify
Alternatively just grab the single helm-spotify.el
file and
install that in your preferred way.
M-x helm-spotify
and type a search string.
(The search begins after you’ve typed at least 2 characters. You can use space-separated terms for psuedo-fuzzy matching.)
C-n | Next item. |
C-p | Previous item. |
RET | Play this track. |
C-z | Play this album. |
TAB | More options. |
C-h m | Full list of keyboard shortcuts. |
Ready to use.
Currently OSX & Linux only. Windows support is available, but partial. Please contribute the code for your platform, if you can!
Find out what emacs says your system-type
is. (C-h v system-type
).
Let’s say it shows the symbol ms-dos
. Then you need to write this function:
(defmulti-method spotify-play-href 'ms-dos
(href)
...
... href is a string that's something like "spotify:track:5Yt80fWRB8JG73XlPjrrKP"
...
... here, you write any code that will cause Spotify to play that href.
...
)
Then submit a pull request!
Thanks to Anders Eurenius for supplying the Linux portion of the code. Thanks to Kungsgeten for supplying the Windows portion of the code.
I tip my hat to the team behind Helm, to Steve Purcell (for Melpa), and to Christina Whyte (for Emacs Multimethods).