From 8fddc0d0a741ca8b77c08a6c8f33ce1ee6a5925e Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sat, 2 Feb 2013 00:56:15 +0100 Subject: emacs: Move EMMS settings to init.org --- .emacs.d/init.org | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to '.emacs.d/init.org') diff --git a/.emacs.d/init.org b/.emacs.d/init.org index 9caead5..50a4161 100644 --- a/.emacs.d/init.org +++ b/.emacs.d/init.org @@ -83,6 +83,52 @@ (eval-after-load "eldoc" '(diminish 'eldoc-mode)) #+END_SRC + Use the standard EMMS configuration and add some MPD settings. + + #+BEGIN_SRC emacs-lisp :tangle init2.el + (defun oni:emms-init () + "Initialization function for EMMS." + (require 'emms-setup) + (require 'emms-player-mpd) + + (emms-standard) + + (add-to-list 'emms-info-functions 'emms-info-mpd) + (add-to-list 'emms-player-list 'emms-player-mpd) + + (setq emms-player-mpd-server-name "localhost") + (setq emms-player-mpd-server-port "6600") + (setq emms-player-mpd-music-directory "/mnt/music/mp3")) + + (eval-after-load "emms-source-file" '(oni:emms-init)) + (setq emms-source-file-default-directory "/mnt/music/") + #+END_SRC + + Add some keybindings for EMMS. + + #+BEGIN_SRC emacs-lisp :tangle init2.el + (defun oni:emms-toggle-playing () + "Toggle between playing/paused states." + (interactive) + (if (eq emms-player-playing-p nil) + (emms-start) + (emms-pause))) + + (defun oni:start-emms () + "Check to see if the function `emms' exists, if not call + `emms-player-mpd-connect' and assume that will have loaded it." + (interactive) + (unless (fboundp 'emms) + (emms-player-mpd-connect)) + (emms)) + + (global-set-key (kbd "") 'emms-next) + (global-set-key (kbd "") 'oni:emms-toggle-playing) + (global-set-key (kbd "") 'emms-previous) + (global-set-key (kbd "") 'emms-stop) + (global-set-key (kbd "") 'oni:start-emms) + #+END_SRC + ** Eshell Add ~unison~ to the list of =eshell-visual-commands= because it -- cgit v1.2.3-54-g00ecf