branch: externals/detached
commit 26501b5ebb4db5f73adb6664081fafeec150a1f2
Author: Niklas Eklund <[email protected]>
Commit: Niklas Eklund <[email protected]>

    Use host-name function in detached-consult
---
 detached-consult.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/detached-consult.el b/detached-consult.el
index b10aea1bce..decf864c55 100644
--- a/detached-consult.el
+++ b/detached-consult.el
@@ -180,10 +180,12 @@ See `consult-multi' for a description of the source 
values."
             :items
             ,(lambda ()
                (let ((host-name (car (detached--host))))
-                 (mapcar #'car (seq-filter
-                                (lambda (x)
-                                  (string= (car (detached--session-host (cdr 
x))) host-name))
-                                (detached-session-candidates 
(detached-get-sessions)))))))
+                 (mapcar #'car
+                         (thread-last (detached-session-candidates 
(detached-get-sessions))
+                                      (seq-map #'cdr)
+                                      (seq-filter
+                                       (lambda (x)
+                                         (string= (detached-session-host-name 
x) host-name))))))))
   "Current host `detached' sessions as a source for `consult'.")
 
 ;;;; Commands

Reply via email to