summaryrefslogtreecommitdiffstats
path: root/emacs/init.org
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/init.org')
-rw-r--r--emacs/init.org40
1 files changed, 30 insertions, 10 deletions
diff --git a/emacs/init.org b/emacs/init.org
index 619a17b..188e384 100644
--- a/emacs/init.org
+++ b/emacs/init.org
@@ -1296,6 +1296,36 @@
(add-hook 'smartparens-mode-on-hook 'oni:smartparens-set-keys)
#+END_SRC
+* Initialize EMMS :emms:
+
+ Initialize a minimal EMMS setup. Load the default players so we can
+ use mplayer or any of the generic mp3 and ogg players.
+
+ Load the MPD player so we can connect to MPD and use that if
+ possible, set the music directory to MPD's music directory so it
+ knows how to translate filenames to something MPD understands.
+
+ Load the =emms-mode-line= module so we can display some information in
+ the mode-line about which song is playing and set my preferred
+ function for extracting this information. The =emms-info-mpd= function
+ doesn't seem to return anything, so I've had to improvise to turn
+ absolute file names into something nicer.
+
+ #+BEGIN_SRC emacs-lisp
+ (eval-after-load "emms"
+ `(progn
+ (emms-minimalistic)
+ (emms-default-players)
+
+ (require 'emms-player-mpd)
+ (add-to-list 'emms-player-list 'emms-player-mpd)
+ (setq emms-player-mpd-music-directory "/mnt/music/mp3")
+
+ (require 'emms-mode-line)
+ (setq emms-mode-line-mode-line-function 'oni:mode-line-current-song)
+ (emms-mode-line 1)))
+ #+END_SRC
+
* All the rest
This still needs to be sorted out and documented, haven't had time
@@ -1517,16 +1547,6 @@
(setq eap-music-library "/mnt/music")
(setq eap-playlist-library "~/music/playlists")
- ;;;; EMMS
- (eval-after-load "emms"
- `(progn
- (emms-minimalistic)
- (emms-default-players)
-
- (require 'emms-player-mpd)
- (add-to-list 'emms-player-list 'emms-player-mpd)
- (setq emms-player-mpd-music-directory "/mnt/music/mp3")))
-
;;;; Auto-complete
(setq-default ac-sources '(ac-source-imenu