Function: eca-start-session
eca-start-session is a natively compiled function defined in eca.el.
Signature
(eca-start-session SESSION &optional ON-READY)
Documentation
Start SESSION, opening its chat when the server is ready.
Already started sessions just get their chat opened. ON-READY is
called with SESSION once it is usable, see eca--initialize.
Source Code
;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca.el
(defun eca-start-session (session &optional on-ready)
"Start SESSION, opening its chat when the server is ready.
Already started sessions just get their chat opened. ON-READY is
called with SESSION once it is usable, see `eca--initialize'."
(pcase (eca--session-status session)
('stopped (eca-process-start session
(lambda ()
(eca--initialize session on-ready))
(-partial #'eca--handle-message session)))
('started (eca-chat-open session)
(when on-ready (funcall on-ready session)))
('starting (eca-info "eca server is already starting")))
session)