A GNU Emacs major mode that acts as a front end to mpc.
The easiest way to install would probably be through MELPA.
To do this add MELPA to your package-archives
list if you have not
yet done so:
(require 'package) ;; You might already have this line
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/"))
(package-initialize) ;; You might already have this line
Then install the package through either list-packages
or by just
running M-x package-install simple-mpc
.
- Clone the repository
- Add it to your emacs init:
(add-to-list 'load-path "path/to/simple-mpc")
(require 'simple-mpc)
Start by executing M-x simple-mpc
. The rest of the keybindings now
appear in a buffer. Configuration can be done with M-x
customize-group <RET> simple-mpc
.
Simple-mpc consists of three ‘views’, two of which have their own minor mode that implements specific extra functionality:
view | major mode | minor mode |
---|---|---|
main | simple-mpc-mode | / |
query | simple-mpc-mode | simple-mpc-query-mode |
current playlist | simple-mpc-mode | simple-mpc-current-playlist-mode |
simple-mpc-mode is always active and contains the most common
bindings, which can be viewed with C-h m
. Additional functionality
is added with minor modes. Someone who does not like the interface can
use simple-mpc-query-mode
and simple-mpc-current-playlist-mode
directly.
This mode was inspired by mingus written by Niels Giesen and parts of the interface were inspired by mu4e written by Dirk-Jan C. Binnema. I used mingus for > 4 years and was mostly happy with it, but occasionally there were bugs and interface choices that I disagreed with. After looking through the source code in an attempt to fix these issues I came to the conclusion that it would be better to implement my own mode. A big reason for this decision was the fact that mingus uses its own MPD library implementation called libmpdee.el, which I expect contain some obscure bugs. I think it is a better choice to instead take advantage of mpc, a small program that is maintained by MPD developers and implements more than libmpdee.el. On top of that it makes the major mode much smaller and easier to maintain. Currently simple-mpc consists of ~300 LOC versus ~5000 LOC for mingus (mingus does have more features though).
GNU Emacs also contains mpc.el written by Stefan Monnier. It’s interesting but wasn’t really what I was looking for, partly because of its interface (inspired by Rhythmbox), and partly because it’s not particularly well documented.