Function: magit-project-dispatch

magit-project-dispatch is an autoloaded, interactive and byte-compiled function defined in magit-extras.el.

Signature

(magit-project-dispatch)

Documentation

Run magit-dispatch in the current project's root.

Note that for magit-dispatch to operate in the selected project, the current buffer's default-directory must be located in the selected repository. To achieve that, a Dired buffer is created.

To teach project-switch-project about this command, you have to add something like this to your configuration:

    (keymap-set project-prefix-map "M" #'magit-project-dispatch)
    (add-to-list 'project-switch-commands
                 '(magit-project-dispatch "Magit Dispatch") t)

Also see magit-project-status.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260822.1158/magit-extras.el
;;;###autoload
(defun magit-project-dispatch ()
  "Run `magit-dispatch' in the current project's root.

Note that for `magit-dispatch' to operate in the selected project,
the current buffer's `default-directory' must be located in the
selected repository.  To achieve that, a Dired buffer is created.

To teach `project-switch-project' about this command, you have to
add something like this to your configuration:

    (keymap-set project-prefix-map \"M\" #\\='magit-project-dispatch)
    (add-to-list \\='project-switch-commands
                 \\='(magit-project-dispatch \"Magit Dispatch\") t)

Also see `magit-project-status'."
  (interactive)
  (if (fboundp 'project-root)
      (let ((dir (project-root (project-current t))))
        (find-file dir)
        (transient-setup 'magit-dispatch))
    (user-error "`magit-project-status' requires `project' 0.3.0 or greater")))