Skip to content

Commit

Permalink
Add embark actions for genres
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo-Heagren committed Apr 17, 2022
1 parent fbc681c commit 1ee5087
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions consult-emms-embark.el
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,20 @@ the track list."
:require-match t
:prompt (format "%s: " genre))))

(embark-define-keymap consult-emms-embark-genre-actions
"Keymap for actions on genres in `consult-emms'."
("p" '("Add to playlist". consult-emms-embark--add-genre-playlist))
("g" '("Goto...". consult-emms-embark-genre-goto)))

(defvar consult-emms-embark-genre-goto
(let ((map (make-sparse-keymap)))
(keymap-set map "g" '("Genre" . consult-emms--choose-track-or-album-genre))
map)
"Keymap for actions moving from a track to an associated entity.")
(fset 'consult-emms-embark-genre-goto consult-emms-embark-genre-goto)

(add-to-list 'embark-keymap-alist '(genre . consult-emms-embark-genre-actions))

;;;; Streams

(defun consult-emms-embark--add-stream-playlist (stream-name)
Expand Down

0 comments on commit 1ee5087

Please sign in to comment.