Function: eca-providers--sort-key

eca-providers--sort-key is a natively compiled function defined in eca-providers.el.

Signature

(eca-providers--sort-key PROVIDER)

Documentation

Return a sort key for PROVIDER (lower = higher priority).

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-providers.el
;; Provider sorting

(defun eca-providers--sort-key (provider)
  "Return a sort key for PROVIDER (lower = higher priority)."
  (let* ((auth (plist-get provider :auth))
         (status (plist-get auth :status))
         (configured (plist-get provider :configured)))
    (cond
     ((member status '("authenticated" "expiring" "expired")) 0)
     ((string= status "local") 1)
     ((and configured (member status '("unauthenticated" "not-running"))) 2)
     (t 3))))