;;; emus.el --- Simple music player for Emacs ;; Author: T. G. Vaughan ;; Version: 1.0 ;; Keywords: multimedia ;; URL: http://github.com/tgvaughan/emus ;;; Commentary: ;; This is a simple package for playing audio from a local library ;; of audio files. ;;; Code: (defgroup emus nil "Simple music player for Emacs inspired by CMUS." :group 'multimedia) (defcustom emus-directory "~/Music/" "Directory containing audio files for emus." :type 'string :group 'emus) (defcustom emus-mpg123-excecutable "mpg123" "Name of (and, optionally, path to) mpg123 binary." :type 'string :group 'emus) (defun emus-get-audio-files () "Get all mp3 files in main emus directory." (directory-files-recursively emus-directory ".*\\.mp3")) (defun emus () "Switch to *emus* audio library buffer." (interactive) (switch-to-buffer "*emus*") (emus-mode)) (define-derived-mode emus-mode special-mode "Emus" "Major mode for EMUS music player." (setq-local default-directory emus-directory) (let ((player (make-process :name "mpg123" :command '(emus-mpg123-excecutable "-R")))) (process-send-string player "load The Midnight - Endless Summer - 01 Endless Summer.mp3\n"))) ;;; emus.el ends here