Skip to content

Commit

Permalink
consult-emms-embark-track-actions: actions for adding artist/album
Browse files Browse the repository at this point in the history
Keymap on "a", with actions "a" (artist) and "b" (album).
  • Loading branch information
Hugo-Heagren committed Mar 30, 2022
1 parent 13e9fb8 commit 30c68ac
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions consult-emms-embark.el
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Selected track is added to the current playlist."
"Keymap for actions on tracks in `consult-emms'."
("p" '("Add to playlist" . consult-emms-embark--add-track-playlist))
("g" '("Goto..." . consult-emms-embark-track-goto))
("a" '("Add... " . consult-emms-embark-track-add))
("e" '("Edit tags" . consult-emms-embark--edit-track-tags)))

(defvar consult-emms-embark-track-goto
Expand All @@ -63,6 +64,14 @@ Selected track is added to the current playlist."
"Keymap for actions moving from a track to an associated entity.")
(fset 'consult-emms-embark-track-goto consult-emms-embark-track-goto)

(defvar consult-emms-embark-track-add
(let ((map (make-sparse-keymap)))
(keymap-set map "a" '("Artist" . consult-emms-embark--track-add-artist))
(keymap-set map "b" '("Album" . consult-emms-embark--track-add-album))
map)
"Keymap for actions queuing track-associated entities.")
(fset 'consult-emms-embark-track-add consult-emms-embark-track-add)

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

;;;;; Playlist Tracks
Expand Down

0 comments on commit 30c68ac

Please sign in to comment.