Function: sesman-links

sesman-links is a byte-compiled function defined in sesman.el.

Signature

(sesman-links SYSTEM &optional SESSION-OR-NAME CXT-TYPES SORT)

Documentation

Retrieve all links for SYSTEM, SESSION-OR-NAME and CXT-TYPES.

SESSION-OR-NAME can be either a session or a name of the session. If SORT is non-nil links are sorted in relevance order and sesman-current-links lead the list, otherwise links are returned in the creation order.

Source Code

;; Defined in ~/.emacs.d/elpa/sesman-20240417.1723/sesman.el
(defun sesman-links (system &optional session-or-name cxt-types sort)
  "Retrieve all links for SYSTEM, SESSION-OR-NAME and CXT-TYPES.
SESSION-OR-NAME can be either a session or a name of the session. If SORT is
non-nil links are sorted in relevance order and `sesman-current-links' lead the
list, otherwise links are returned in the creation order."
  (let* ((ses-name (if (listp session-or-name)
                       (car session-or-name)
                     session-or-name))
         (lfn (sesman--link-lookup-fn system ses-name cxt-types)))
    (if sort
        (delete-dups (append
                      (sesman-current-links system ses-name)
                      (sesman--sort-links system (seq-filter lfn sesman-links-alist))))
      (seq-filter lfn sesman-links-alist))))