diff options
Diffstat (limited to 'lisp/mpc.el')
-rw-r--r-- | lisp/mpc.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/mpc.el b/lisp/mpc.el index 47fe4dea7fa..fade23e3cc2 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -819,8 +819,8 @@ The songs are returned as alists." (defun mpc-cmd-status () (mpc-proc-cmd-to-alist "status")) -(defun mpc-cmd-play () - (mpc-proc-cmd "play") +(defun mpc-cmd-play (&optional sn) + (mpc-proc-cmd (if sn (list "play" sn) "play")) (mpc-status-refresh)) (defun mpc-cmd-seekcur (time) @@ -849,7 +849,7 @@ If PLAYLIST is t or nil or missing, use the main playlist." ;; Sort them from last to first, so the renumbering ;; caused by the earlier deletions don't affect ;; later ones. - (sort song-poss '>)))) + (sort (copy-sequence song-poss) '>)))) (if (stringp playlist) (puthash (cons 'Playlist playlist) nil mpc--find-memoize))) @@ -873,7 +873,7 @@ If PLAYLIST is t or nil or missing, use the main playlist." ;; Sort them from last to first, so the renumbering ;; caused by the earlier deletions affect ;; later ones a bit less. - (sort song-poss '>)))) + (sort (copy-sequence song-poss) '>)))) (if (stringp playlist) (puthash (cons 'Playlist playlist) nil mpc--find-memoize)))) @@ -2089,7 +2089,7 @@ This is used so that they can be compared with `eq', which is needed for ((null (with-current-buffer plbuf (re-search-forward re nil t))) ;; song-file only appears once in the playlist: no ambiguity, ;; we're good to go! - (mpc-proc-cmd (list "play" sn))) + (mpc-cmd-play sn)) (t ;; The song appears multiple times in the playlist. If the current ;; buffer holds not only the destination song but also the current @@ -2391,6 +2391,7 @@ This is used so that they can be compared with `eq', which is needed for (interactive) (mpc-cmd-stop) (mpc-cmd-clear) + (mpc-songs-refresh) (mpc-status-refresh)) (defun mpc-pause () @@ -2750,7 +2751,9 @@ If stopped, start playback." (if current-prefix-arg ;; FIXME: We should provide some completion here, especially for the ;; case where the user specifies a local socket/file name. - (setq mpc-host (read-string "MPD host and port: " nil nil mpc-host))) + (setq mpc-host (read-string + (format-prompt "MPD host and port" mpc-host) + nil nil mpc-host))) nil)) (let* ((song-buf (mpc-songs-buf)) (song-win (get-buffer-window song-buf 0))) |