Function: sesman--link-session-interactively

sesman--link-session-interactively is a byte-compiled function defined in sesman.el.

Signature

(sesman--link-session-interactively SESSION CXT-TYPE CXT-VAL)

Source Code

;; Defined in ~/.emacs.d/elpa/sesman-20240417.1723/sesman.el
(defun sesman--link-session-interactively (session cxt-type cxt-val)
  (let ((system (sesman--system)))
    (unless cxt-type
      (let ((cxt (sesman--least-specific-context system)))
        (setq cxt-type (car cxt)
              cxt-val (cdr cxt))))
    (let ((cxt-name (symbol-name cxt-type)))
      (if (member cxt-type (sesman-context-types system))
          (let ((session (or session
                             (sesman-ask-for-session
                              system
                              (format "Link with %s %s: "
                                      cxt-name (sesman--abbrev-path-maybe
                                                (sesman-context cxt-type system)))
                              (sesman--all-system-sessions system 'sort)
                              'ask-new))))
            (sesman-link-session system session cxt-type cxt-val))
        (error (format "%s association not allowed for this system (%s)"
                       (capitalize cxt-name)
                       system))))))