Function: mpc-playlist-rename
mpc-playlist-rename is an interactive and byte-compiled function
defined in mpc.el.gz.
Signature
(mpc-playlist-rename OLDNAME NEWNAME)
Documentation
Rename playlist OLDNAME to NEWNAME.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/mpc.el.gz
(defun mpc-playlist-rename (oldname newname)
"Rename playlist OLDNAME to NEWNAME."
(interactive
(let* ((oldname (if (and (eq mpc-tag 'Playlist) (null current-prefix-arg))
(buffer-substring (line-beginning-position)
(line-end-position))
(completing-read "Rename playlist: "
(mpc-cmd-list 'Playlist)
nil 'require-match)))
(newname (read-string (format-message "Rename `%s' to: " oldname))))
(if (zerop (length newname))
(error "Aborted")
(list oldname newname))))
(mpc-proc-cmd (list "rename" oldname newname))
(let ((buf (mpc-proc-buffer (mpc-proc) 'Playlist)))
(if (buffer-live-p buf)
(with-current-buffer buf (mpc-tagbrowser-refresh)))))