Function: magit-process-buffer
magit-process-buffer is an interactive and natively compiled function
defined in magit-process.el.
Signature
(magit-process-buffer &optional NODISPLAY)
Documentation
Display the current repository's process buffer.
If that buffer doesn't exist yet, then create it. Non-interactively return the buffer and unless optional NODISPLAY is non-nil also display it.
Key Bindings
magit-mode-line-process-map <mode-line> <mouse-1> magit-mode-map $
Source Code
;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-process.el
(defun magit-process-buffer (&optional nodisplay)
"Display the current repository's process buffer.
If that buffer doesn't exist yet, then create it.
Non-interactively return the buffer and unless
optional NODISPLAY is non-nil also display it."
(interactive)
(let ((topdir (magit-toplevel)))
(unless topdir
(magit--with-safe-default-directory nil
(setq topdir default-directory)
(let (prev)
(while (not (equal topdir prev))
(setq prev topdir)
;; Do not use file-name-parent-directory.
(setq topdir (file-name-directory (directory-file-name topdir)))))))
(let ((buffer (or (seq-find (##with-current-buffer %
(and (eq major-mode 'magit-process-mode)
(equal default-directory topdir)))
(buffer-list))
(magit-generate-new-buffer 'magit-process-mode
nil topdir))))
(with-current-buffer buffer
(if magit-root-section
(when magit-process-log-max
(magit-process-truncate-log))
(magit-process-mode)
(let ((inhibit-read-only t)
(magit-insert-section--parent nil)
(magit-insert-section--oldroot nil))
(make-local-variable 'text-property-default-nonsticky)
(magit-insert-section (processbuf)
(insert "\n")))))
(unless nodisplay
(magit-display-buffer buffer))
buffer)))