branch: elpa/hyperdrive
commit b5e881017c54dea4557c3d213084e87018a89df9
Author: Adam Porter <a...@alphapapa.net>
Commit: Joseph Turner <jos...@ushin.org>

    WIP
---
 hyperdrive.el | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index bf0c6a3d0e..1e38ce1e23 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -847,6 +847,7 @@ The return value of this function is the retrieval buffer."
      :if-non-nil hyperdrive-current-entry
      :inapt-if-not (lambda  ()
                      (hyperdrive-entry-version (hyperdrive-entry-next 
hyperdrive-current-entry)))
+     ;; :transient t
      :description (lambda ()
                     (if-let ((hyperdrive-current-entry)
                              (hyperdrive (hyperdrive-entry-hyperdrive 
hyperdrive-current-entry)))
@@ -856,14 +857,17 @@ The return value of this function is the retrieval 
buffer."
                       "Next")))
     ("v p" "Previous" hyperdrive-previous-version
      :if-non-nil hyperdrive-current-entry
+     :inapt-if-not (lambda  ()
+                     (pcase (hyperdrive-entry-previous 
hyperdrive-current-entry :cache-only t)
+                       ('unknown nil)
+                       (it (hyperdrive-entry-version it))))
+     ;; :transient t
      :description (lambda ()
                     (if-let ((hyperdrive-current-entry)
                              (hyperdrive (hyperdrive-entry-hyperdrive 
hyperdrive-current-entry)))
-                        (concat "Previous: "
-                                (propertize (format "%s"
-                                                    (or 
(hyperdrive-entry-version (hyperdrive-entry-previous hyperdrive-current-entry 
:cache-only t))
-                                                        "latest"))
-                                            'face 'transient-value))
+                        (concat "Previous" (when-let ((version 
(hyperdrive-entry-version (hyperdrive-entry-previous 
hyperdrive-current-entry))))
+                                             (concat ": " (propertize 
(number-to-string version)
+                                                                      'face 
'transient-value))))
                       "Previous")))]
    ["Upload"
     ("u f" "File" hyperdrive-upload-file)

Reply via email to