Function: eca-doom--session-for-persp
eca-doom--session-for-persp is a natively compiled function defined in
eca-doom.el.
Signature
(eca-doom--session-for-persp PERSP)
Documentation
Return the ECA session related to the perspective PERSP, or nil.
Resolves through the buffers of PERSP: first via their cached session id, then by matching their directory against the workspace folders of each session.
Source Code
;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-doom.el
(defun eca-doom--session-for-persp (persp)
"Return the ECA session related to the perspective PERSP, or nil.
Resolves through the buffers of PERSP: first via their cached
session id, then by matching their directory against the workspace
folders of each session."
(let ((buffers (-filter #'buffer-live-p (persp-buffers persp))))
(or (-some (lambda (buffer)
(eca-get eca--sessions
(buffer-local-value 'eca--session-id-cache buffer)))
buffers)
(-first (lambda (session)
(-first (lambda (buffer)
(eca-doom--buffer-in-folders-p
buffer
(eca--session-workspace-folders session)))
buffers))
(eca-vals eca--sessions)))))