Function: sesman-restart

sesman-restart is an autoloaded, interactive and byte-compiled function defined in sesman.el.

Signature

(sesman-restart &optional WHICH)

Documentation

Restart sesman session.

When WHICH is nil, restart the current session; when a single universal argument or 'linked, restart all linked sessions; when a double universal argument, t or 'all, restart all sessions. For programmatic use, WHICH can also be a session or a name of the session, in which case that session is restarted.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/sesman-20240417.1723/sesman.el
;;;###autoload
(defun sesman-restart (&optional which)
  "Restart sesman session.
When WHICH is nil, restart the current session; when a single universal
argument or 'linked, restart all linked sessions; when a double universal
argument, t or 'all, restart all sessions. For programmatic use, WHICH can also
be a session or a name of the session, in which case that session is restarted."
  (interactive "P")
  (let* ((system (sesman--system))
         (sessions (sesman--on-C-u-u-sessions system which)))
    (if (null sessions)
        (message "No %s sessions found" system)
      (with-temp-message (format "Restarting %s %s %s"  system
                                 (if (= 1 (length sessions)) "session" "sessions")
                                 (mapcar #'car sessions))
        (mapc (lambda (s)
                (sesman-restart-session system s))
              sessions))
      ;; restarting is not guaranteed to finish here, but what can we do?
      (run-hooks 'sesman-post-command-hook))))