Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1b078b6
Initial Commit
dwaddle Dec 15, 2012
3e1f45c
Dubbele mpcel-devel.el in tijdelijk verwijderd
dwaddle Dec 15, 2012
0291ba7
Dubbele file mpcel-devel-test.el in tijdelijk verwijderd
dwaddle Dec 15, 2012
4c7c55b
File ChangeLog verwijderd uit tijdelijke directory
dwaddle Dec 15, 2012
03d85c3
Committed ChangeLog, mpc-options.txt en patch-1.1-1.2.patch
dwaddle Dec 15, 2012
ef5c7dc
Verschillende functie's verplaatst van mpcel-devel-test.el naar mpcel.el
dwaddle Dec 15, 2012
518c3ee
deleted mpcel-devel-test.el
dwaddle Dec 15, 2012
ce7d6c2
Version number reported by function mpcel-version corrected from 1.1 …
dwaddle Dec 15, 2012
995f905
De functie werkend gemaakt (defun mpcel-library-list ()
dwaddle Dec 16, 2012
63cc3b0
Moved mpc-options.txt to the untracked files
dwaddle Dec 19, 2012
f269ed0
Deleted typo in mpcel-playlist print ;=)
dwaddle Dec 24, 2012
7a4b081
Changed (toggle-read-only) in (setq buffer-read-only t)
dwaddle Jan 7, 2013
7962814
Modified comment for function
dwaddle Jan 7, 2013
8d88443
Changed creating a new buffer,new buffer wasn't visible
dwaddle Jan 7, 2013
5d149a3
Changed another (toggle-read-only) in (setq buffer-read-only t)
dwaddle Jan 7, 2013
799de15
Commented the function (mpc-playlist-clear () out temporary
dwaddle Jan 7, 2013
d57d6bc
Uncommented the function (mpcel-playlist-clear
dwaddle Jan 7, 2013
f1f79a0
Fixed typo in repeat command
dwaddle Jan 7, 2013
a406c70
Added a p in stopped
dwaddle Jan 7, 2013
2eb1dd0
Replaced Random by Repeat in (mpcel-repeat-mode)
dwaddle Jan 7, 2013
c792dc9
Completed (mpcel-library-search-track (pattern)
dwaddle Jan 7, 2013
ac3cabb
Added function (mpcel-single-mode (onoroff)
dwaddle Jan 8, 2013
7389353
Added function (defun mpcel-status ()
dwaddle Jan 10, 2013
1e5c575
Added function (defun mpcel-now-playing ()
dwaddle Jan 10, 2013
8f62e2a
Changed version line in function (mpcel-version)
dwaddle Jan 14, 2013
b5680a9
Changed ChangeLog en mpcel.el (typo)
dwaddle Aug 25, 2013
6b0d356
Modified offoron in onoroff for consistency sake
dwaddle Sep 3, 2013
71975bd
Modified (defun mpcel-playlist-print ()
dwaddle Sep 3, 2013
87d3f5a
defun mpcel-playlist-view ()
dwaddle Sep 3, 2013
175d85b
Deleted not functional code
dwaddle Sep 4, 2013
4f5e4d8
Deleted debug code and personal comments
dwaddle Sep 4, 2013
0fb7e36
Deleted ChangeLog
dwaddle Sep 4, 2013
8eb01a0
Renamed README to README.md
dwaddle Sep 4, 2013
b128c86
deleted README, renamed to READNE.md
dwaddle Sep 4, 2013
8fd857b
Added new function:
dwaddle Sep 4, 2013
127596e
Modified mpcel-playlist-load (playlist)
dwaddle Sep 4, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added README.md
Empty file.
95 changes: 80 additions & 15 deletions mpcel.el
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@
(defun mpcel-version ()
"mpcel version. This is the first."
(interactive)
(message "mpcel version 1.1 - written in 2006 by Bourgoin Jean-Baptiste"))

(message "mpcel version 1.3 - Original version written in 2006 by Bourgoin Jean-Baptiste"))

;; MPD

Expand Down Expand Up @@ -120,7 +119,28 @@
"Stop playing music in mpd"
(interactive)
(call-process mpcel-mpc-program nil nil nil "stop")
(message "music is stoped"))
(message "music is stopped"))

;; mpcel status
(defun mpcel-status ()
"Displays mpc status in the minibuffer"
(interactive)
(message "mpc-status: %s"
(shell-command-to-string "mpc status |tail -n -1")))

;; mpcel now playing
(defun mpcel-now-playing ()
"Displays the title of the current song in the mini-buffer"
(interactive)
(message "Now playing: %s" (shell-command-to-string "mpc status|head -n1")))

;;toggle single mode
(defun mpcel-single-mode (onoroff)
"mpcel : toggle single mode."
(interactive
"MSingle repeat ? ( \"on\" or \"off\") : ")
(call-process mpcel-mpc-program nil nil nil "single" onoroff)
(message (concat "Single repeat mode : " onoroff)))

;; toggle random mode.
(defun mpcel-random-mode (onoroff)
Expand All @@ -131,12 +151,12 @@
(message (concat "Random mode : " onoroff)))

;; toggle repeat mode.
(defun mpcel-repeat-mode (offoron)
(defun mpcel-repeat-mode (onoroff)
"mpcel : toggle repeat mode."
(interactive
"MRandomize ? ( \"on\" or \"off\") : ")
(call-process mpcel-mpc-program nil nil nil "reapeat" offoron)
(message (concat "Repeat mode : " offoron)))
"MRepeat ? ( \"on\" or \"off\") : ")
(call-process mpcel-mpc-program nil nil nil "repeat" onoroff)
(message (concat "Repeat mode : " onoroff)))

;; mpc pause playing music :
(defun mpcel-pause ()
Expand Down Expand Up @@ -183,24 +203,70 @@
(defun mpcel-playlist-load (playlist)
"mpcel : Loads playlist"
(interactive "MPlaylist name: ")
(mpcel-playlist-clear)
(if (eq 0 (call-process mpcel-mpc-program nil nil nil "load" playlist))
(message "Playlist %s loaded" playlist)
(message "Playlist %s not found" playlist))
)

; merge playlist with the current playlist
(defun mpcel-playlist-merge (playlist)
"Merge playlist with the current playlist"
(interactive "MPlaylist name: ")
(if (eq 0 (call-process mpcel-mpc-program nil nil nil "load" playlist))
(message "Playlist %s loaded" playlist)
(message "Playlist %s not found" playlist))
)
(defun mpcel-playlist-view ()
"Shows available playlists"
(interactive)
(switch-to-buffer (get-buffer-create "*mpcel Playlists*"))
(shell-command "mpc lsplaylists" "*mpcel Playlists*" "*mpcel Playlists*")
(with-current-buffer "*mpcel Playlists*"
(setq buffer-read-only t))
)

;; library functions

(defun mpcel-library-list ()
"Shows all the files in the music library"
(interactive)
(switch-to-buffer (get-buffer-create "*mpcel Music library*"))
(shell-command "mpc listall" "*mpcel Music library*" "*mpcel Music library")
(with-current-buffer "*mpcel Music library*"
(setq buffer-read-only t)
))

(defun mpcel-library-search-track (pattern)
(interactive "sEnter searchpattern: " pattern)
;; Use buffer with Music library
( if (string= (buffer-name) "*mpcel Music library*")
(message "Library buffer select")
(mpcel-library-list))
(search-forward pattern)
(goto-char (line-beginning-position))
(push-mark (line-end-position) nil t)
)

;; playlist functions

;; prints the playlist :
(defun mpcel-playlist-print ()
"Prins entire mpd's playlist"
"Prints entire mpd's playlist"
(interactive)
(switch-to-buffer (get-buffer-create "*mpcel playlist*"))
(shell-command
"mpc --format \"[%artist%--[%album%--[%title%]]]|[%file%]\" playlist"))
"mpc --format \"[%artist%--[%album%--[%title%]]]|[%file%]\" playlist" "*mpcel playlist*")
(with-current-buffer "*mpcel playlist*"
(setq buffer-read-only t))
)

;; clear playlist
;;clear playlist
(defun mpcel-playlist-clear ()
"Clear the mpd playlist"
(interactive)
(call-process mpcel-mpc-program nil nil nil "clear")
(message "the playlist is cleared"))
"Clear the mpd playlist"
(interactive)
(call-process mpcel-mpc-program nil nil nil "clear")
(message "the playlist is cleared"))

;; add song :
(defun mpcel-add-songs (art rest)
Expand All @@ -218,7 +284,6 @@
(message "Tracks : %s"
(shell-command-to-string "mpc playlist | wc -l")))


;; shuffle playlist
(defun mpcel-playlist-shuffle ()
"mpcel : a Troll come to make your playlist untidiness"
Expand Down