aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp/my/my-emms.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/lisp/my/my-emms.el')
-rw-r--r--emacs/.emacs.d/lisp/my/my-emms.el21
1 files changed, 17 insertions, 4 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-emms.el b/emacs/.emacs.d/lisp/my/my-emms.el
index 331f309..e77089d 100644
--- a/emacs/.emacs.d/lisp/my/my-emms.el
+++ b/emacs/.emacs.d/lisp/my/my-emms.el
@@ -467,10 +467,23 @@ under /zzz-seren/."
(defun my-emms-playlist-random-group ()
(interactive)
(with-current-emms-playlist
- (goto-line (1+ (random (count-lines (point-min) (point-max)))))
- (pcase-let ((`(,group-start . ,group-end) (my-emms-playlist-group-bounds)))
- (goto-line group-start)
- (emms-playlist-mode-play-current-track))))
+ (remove-overlays)
+ (goto-line (1+ (random (count-lines (point-min) (point-max)))))
+ (pcase-let ((`(,group-start . ,group-end) (my-emms-playlist-group-bounds)))
+ (goto-line group-start)
+ (overlay-put
+ (make-overlay (point) (point))
+ 'before-string (propertize
+ "x" 'display
+ `(left-fringe down-arrow emms-playlist-selected-face)))
+ (save-excursion
+ (goto-line (1- group-end))
+ (overlay-put
+ (make-overlay (point) (point))
+ 'before-string (propertize
+ "x" 'display
+ `(left-fringe up-arrow emms-playlist-selected-face))))
+ (emms-playlist-mode-play-current-track))))
(defun my-emms-next-track-or-random-group ()
(interactive)