Function: eca-process--server-command
eca-process--server-command is a natively compiled function defined in
eca-process.el.
Signature
(eca-process--server-command)
Documentation
Return the command to start server.
Source Code
;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-process.el
(defun eca-process--server-command ()
"Return the command to start server."
(let ((system-command (executable-find "eca" (file-remote-p default-directory))))
(cond
(eca-custom-command (list :decision 'custom
:command eca-custom-command))
(system-command
(list :decision 'system
:command (list system-command "server")))
((file-remote-p default-directory)
(list :decision 'error-download
:message "ECA not found on remote host. Install `eca` on the remote PATH or set `eca-custom-command` to the remote binary path. ECA does not auto-install over TRAMP."))
((and (not (f-exists? eca-server-install-path))
(not (eca-process--get-latest-server-version)))
(list :decision 'error-download
:message "Could not fetch latest version of eca. Please check your internet connection and try again. You can also download eca manually and set the path via eca-custom-command variable"))
((f-exists? eca-server-install-path)
(let ((current (eca-process--get-current-server-version))
(latest (eca-process--get-latest-server-version)))
(if (or (null latest) ;; cannot check for updates, use installed binary.
(and current (not (string-version-lessp current latest))))
(list :decision 'already-installed
:command (list eca-server-install-path "server"))
;; Outdated, or version file missing (e.g. interrupted
;; update): reinstall to get back to a known version.
(list :decision 'download
:latest-version latest
:command (list eca-server-install-path "server")))))
(t (list :decision 'download
:latest-version (eca-process--get-latest-server-version)
:command (list eca-server-install-path "server"))))))