Variable: magit-status-initial-section

magit-status-initial-section is a customizable variable defined in magit-status.el.

Value

(1)

Documentation

The section point is placed on when a status buffer is created.

When such a buffer is merely being refreshed or being shown again after it was merely buried, then this option has no effect.

If this is nil, then point remains on the very first section as usual. Otherwise it has to be a list of integers and section identity lists. The members of that list are tried in order until a matching section is found.

An integer means to jump to the nth section, 1 for example jumps over the headings. To get a section's "identity list" use C-u (universal-argument) M-x magit-describe-section-briefly (magit-describe-section-briefly).

If, for example, you want to jump to the commits that haven't been pulled from the upstream, or else the second section, then use: (((unpulled . "..@{upstream}") (status)) 1).

See option magit-section-initial-visibility-alist for how to control the initial visibility of the jumped to section.

This variable was added, or its default value changed, in magit version 2.90.0.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-status.el
(defcustom magit-status-initial-section '(1)
  "The section point is placed on when a status buffer is created.

When such a buffer is merely being refreshed or being shown again
after it was merely buried, then this option has no effect.

If this is nil, then point remains on the very first section as
usual.  Otherwise it has to be a list of integers and section
identity lists.  The members of that list are tried in order
until a matching section is found.

An integer means to jump to the nth section, 1 for example
jumps over the headings.  To get a section's \"identity list\"
use \\[universal-argument] \\[magit-describe-section-briefly].

If, for example, you want to jump to the commits that haven't
been pulled from the upstream, or else the second section, then
use: (((unpulled . \"..@{upstream}\") (status)) 1).

See option `magit-section-initial-visibility-alist' for how to
control the initial visibility of the jumped to section."
  :package-version '(magit . "2.90.0")
  :group 'magit-status
  :type '(choice (const :tag "As usual" nil)
                 (repeat (choice (number :tag "Nth top-level section")
                                 (sexp   :tag "Section identity")))))