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

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

[nongnu] elpa/hyperdrive 17f3cde160 10/31: Change: (hyperdrive-mirror--i


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 17f3cde160 10/31: Change: (hyperdrive-mirror--insert-taxy) Sort taxys
Date: Fri, 3 Nov 2023 22:00:46 -0400 (EDT)

branch: elpa/hyperdrive
commit 17f3cde1603dd98cb8a832e42fb811540af3de8b
Author: Joseph Turner <joseph@ushin.org>
Commit: Adam Porter <adam@alphapapa.net>

    Change: (hyperdrive-mirror--insert-taxy) Sort taxys
    
    new, newer, older, same
---
 hyperdrive-mirror.el | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/hyperdrive-mirror.el b/hyperdrive-mirror.el
index c5a66f0f15..94f52f1a24 100644
--- a/hyperdrive-mirror.el
+++ b/hyperdrive-mirror.el
@@ -289,7 +289,20 @@ KEYS should be a list of grouping keys, as in
               (thread-last
                 (make-fn :name "Hyperdrive mirror"
                          :take (taxy-make-take-function keys 
hyperdrive-mirror-keys))
-                (taxy-fill items)))
+                (taxy-fill items)
+                (taxy-sort* (lambda (a b)
+                              (pcase a
+                                ("New locally" t)
+                                ((and "Newer locally"
+                                      (guard (or (equal b "Older locally")
+                                                 (equal b "Same"))))
+                                 t)
+                                ((and "Older locally" (guard (equal b 
"Same"))) t)
+                                (_ nil)))
+                  ;; TODO: Instead of comparing taxy-name strings, could we set
+                  ;; taxy-key to `new', `newer', `older', or `same' and then
+                  ;; compare keys instead?
+                  #'taxy-name)))
              (format-cons
               (taxy-magit-section-format-items
                hyperdrive-mirror-columns hyperdrive-mirror-column-formatters



reply via email to

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