Skip to content

Commit

Permalink
new function: consult-emms-embark--rename-playlist
Browse files Browse the repository at this point in the history
For renaming playlist buffers
  • Loading branch information
Hugo-Heagren committed Dec 25, 2021
1 parent 4f89cff commit 6754e3b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions consult-emms-embark.el
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ Selected track is added to the current playlist."
(consult-emms-embark--with-buffer-from-text-property
playlist-name (emms-shuffle)))

(defun consult-emms-embark--rename-playlist (playlist-name)
"Shuffle playlist extracted from PLAYLIST-NAME."
(let ((buffer
(consult-emms-embark--get-buffer-text-property playlist-name)))
(with-current-buffer buffer
(call-interactively 'rename-buffer))))

(embark-define-keymap consult-emms-embark-playlist-actions
"Keymap for actions on playlists in `consult-emms'."
("W" '("Write to file" . consult-emms-embark--write-playlist))
Expand Down

0 comments on commit 6754e3b

Please sign in to comment.