Function: sesman-session-for-object
sesman-session-for-object is a byte-compiled function defined in
sesman.el.
Signature
(sesman-session-for-object SYSTEM OBJECT &optional NO-ERROR)
Documentation
Retrieve SYSTEM session which contains OBJECT.
When NO-ERROR is non-nil, don't throw an error if OBJECT is not part of any session. In such case, return nil.
Source Code
;; Defined in ~/.emacs.d/elpa/sesman-20240417.1723/sesman.el
(defun sesman-session-for-object (system object &optional no-error)
"Retrieve SYSTEM session which contains OBJECT.
When NO-ERROR is non-nil, don't throw an error if OBJECT is not part of any
session. In such case, return nil."
(let* ((system (or system (sesman--system)))
(sessions (sesman--all-system-sessions system)))
(or (seq-find (lambda (ses)
(seq-find (lambda (x) (equal object x)) (cdr ses)))
sessions)
(unless no-error
(error "%s is not part of any %s sessions"
object system)))))