Function: sesman-sessions
sesman-sessions is a byte-compiled function defined in sesman.el.
Signature
(sesman-sessions SYSTEM &optional SORT TYPE CXT-TYPES)
Documentation
Return a list of sessions registered with SYSTEM.
When TYPE is either 'all or nil return all sessions registered with the SYSTEM, when 'linked, only linked to the current context sessions, when 'friendly - only friendly sessions. If SORT is non-nil, sessions are sorted in the relevance order with linked sessions leading the list. CXT-TYPES is a list of context types to consider for linked sessions.
Source Code
;; Defined in ~/.emacs.d/elpa/sesman-20240417.1723/sesman.el
(defun sesman-sessions (system &optional sort type cxt-types)
"Return a list of sessions registered with SYSTEM.
When TYPE is either 'all or nil return all sessions registered with the SYSTEM,
when 'linked, only linked to the current context sessions, when 'friendly - only
friendly sessions. If SORT is non-nil, sessions are sorted in the relevance
order with linked sessions leading the list. CXT-TYPES is a list of context
types to consider for linked sessions."
(let ((system (or system (sesman--system))))
(cond
((eq type 'linked)
(sesman--linked-sessions system sort cxt-types))
((eq type 'friendly)
(sesman--friendly-sessions system sort))
((memq type '(all nil))
(if sort
(delete-dups
(append (sesman--linked-sessions system 'sort cxt-types)
(sesman--all-system-sessions system 'sort)))
(sesman--all-system-sessions system)))
(t (error "Invalid session TYPE argument %s" type)))))