Function: dirvish-quit

dirvish-quit is an interactive and natively compiled function defined in dirvish.el.

Signature

(dirvish-quit)

Documentation

Quit current Dirvish session.

If the session is a full-framed one, the window layout is restored. If dirvish-reuse-session is nil, all Dired buffers in the session are killed, otherwise only the invisible Dired buffers within the session are killed and the Dired buffer(s) in the selected window are buried.

Key Bindings

dirvish-directory-view-mode-map q dirvish-misc-mode-map q dirvish-mode-map q dirvish-special-preview-mode-map q

Source Code

;; Defined in /nix/store/1gijwny2yx4fggrsb9l110h1ybs1gdk5-emacs-packages-deps/share/emacs/site-lisp/elpa/dirvish-20260725.1520/dirvish.el
(defun dirvish-quit ()
  "Quit current Dirvish session.
If the session is a full-framed one, the window layout is restored.  If
`dirvish-reuse-session' is nil, all Dired buffers in the session are
killed, otherwise only the invisible Dired buffers within the session
are killed and the Dired buffer(s) in the selected window are buried."
  (interactive)
  (when-let* ((dv (dirvish-curr)) (ct 0) (max-c (length (dv-roots dv))))
    (dirvish--clear-session dv t)
    (while (and (dirvish-curr) (<= ct max-c)) (cl-incf ct) (quit-window))))