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

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

[elpa] externals/listen aa46e05404 1/5: Fix: Insert queue duration after


From: ELPA Syncer
Subject: [elpa] externals/listen aa46e05404 1/5: Fix: Insert queue duration after refreshing
Date: Mon, 4 Mar 2024 15:58:40 -0500 (EST)

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

    Fix: Insert queue duration after refreshing
---
 listen-queue.el | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/listen-queue.el b/listen-queue.el
index 299ae771e1..1cd05d8819 100644
--- a/listen-queue.el
+++ b/listen-queue.el
@@ -171,11 +171,7 @@ intended to be set from the `listen-menu'."
                             "s" (lambda (_) (listen-queue-shuffle 
listen-queue))
                             "l" (lambda (_) "Show (selected) tracks in library 
view."
                                   (call-interactively 
#'listen-library-from-queue))
-                            "!" (lambda (_) (call-interactively 
#'listen-queue-shell-command))))
-            (vtable-end-of-table)
-            (insert (format "Duration: %s"
-                            (listen-format-seconds (cl-reduce #'+ 
(listen-queue-tracks queue)
-                                                              :key 
#'listen-track-duration)))))
+                            "!" (lambda (_) (call-interactively 
#'listen-queue-shell-command)))))
           (goto-char (point-min))
           (listen-queue--highlight-current)
           (hl-line-mode 1))))
@@ -235,10 +231,15 @@ If BACKWARDP, move it backward."
   (when-let ((buffer (listen-queue-buffer queue)))
     (with-current-buffer buffer
       ;; `save-excursion' doesn't work because of the table's being reverted.
-      (let ((pos (point)))
+      (let ((pos (point))
+            (inhibit-read-only t))
         (goto-char (point-min))
         (when (vtable-current-table)
           (vtable-revert-command))
+        (vtable-end-of-table)
+        (insert (format "Duration: %s"
+                        (listen-format-seconds (cl-reduce #'+ 
(listen-queue-tracks queue)
+                                                          :key 
#'listen-track-duration))))
         (goto-char pos)
         (goto-char (pos-bol)))
       (listen-queue--highlight-current)



reply via email to

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