emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/listen 75d1804beb 042/103: Fixes and stuff


From: ELPA Syncer
Subject: [elpa] externals/listen 75d1804beb 042/103: Fixes and stuff
Date: Mon, 26 Feb 2024 12:59:27 -0500 (EST)

branch: externals/listen
commit 75d1804beb8d92ce5f5ea2b37907fc2a19b7e30a
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>

    Fixes and stuff
---
 listen-queue.el |  6 ++++--
 listen.el       | 21 ++++++++++++++-------
 2 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/listen-queue.el b/listen-queue.el
index cad496039b..7c1df5a441 100644
--- a/listen-queue.el
+++ b/listen-queue.el
@@ -286,12 +286,14 @@ PROMPT is passed to `format-prompt', which see."
   (let* ((tracks (listen-queue-tracks queue))
          (current-track (listen-queue-current queue))
          n)
-    (cl-callf2 delete current-track tracks)
+    (when current-track
+      (cl-callf2 delete current-track tracks))
     (setf n (length tracks))
     ;; Don't use dotimes result (bug#16206)
     (dotimes (i n)
       (cl-rotatef (elt tracks i) (elt tracks (+ i (cl-random (- n i))))))
-    (push current-track tracks)
+    (when current-track
+      (push current-track tracks))
     (setf (listen-queue-tracks queue) tracks))
   (listen-queue--update-buffer queue))
 
diff --git a/listen.el b/listen.el
index 47c025fa2c..617baee9f9 100755
--- a/listen.el
+++ b/listen.el
@@ -237,21 +237,28 @@ TIME is an HH:MM:SS string."
   ["Queue mode"
    :description
    (lambda ()
-     (if-let ((queue (map-elt (listen-player-etc listen-player) :queue)))
+     (if-let ((player listen-player)
+              (queue (map-elt (listen-player-etc player) :queue)))
          (format "Queue: %s (track %s/%s)" (listen-queue-name queue)
                  (cl-position (listen-queue-current queue) 
(listen-queue-tracks queue))
                  (length (listen-queue-tracks queue)))
        "No queue"))
-   ("Q" "Show" listen-queue)
-   ("P" "Play another queue" listen-queue-play)
-   ("N" "New" listen-queue-new)
-   ("A" "Add files" listen-queue-add-files)
+   ("Q" "Show" listen-queue
+    :transient t)
+   ("P" "Play another queue" listen-queue-play
+    :transient t)
+   ("N" "New" listen-queue-new
+    :transient t)
+   ("A" "Add files" listen-queue-add-files
+    :transient t)
    ("T" "Select track" (lambda ()
                          "Call `listen-queue-play' with prefix."
                          (interactive)
                          (let ((current-prefix-arg '(4)))
-                           (call-interactively #'listen-queue-play))))
-   ("D" "Discard" listen-queue-discard)
+                           (call-interactively #'listen-queue-play)))
+    :transient t)
+   ("D" "Discard" listen-queue-discard
+    :transient t)
    ])
 
 (provide 'listen)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]