File: magit-section.el.html

This package implements the main user interface of Magit — the collapsible sections that make up its buffers. This package used to be distributed as part of Magit but now it can also be used by other packages that have nothing to do with Magit or Git.

Defined variables (28)

magit--context-menu-bufferFor internal use only.
magit--context-menu-sectionFor internal use only.
magit--current-section-hookInternal variable used for ‘magit-describe-section’.
magit--refreshing-buffer-pWhether the current buffer is presently being refreshed.
magit-insert-section--currentFor internal use only.
magit-insert-section--oldrootFor internal use only.
magit-insert-section--parentFor internal use only.
magit-insert-section-hookHook run after ‘magit-insert-section’s BODY.
magit-keep-region-overlayWhether to keep the region overlay when there is a valid selection.
magit-menu--desc-valuesFor internal use only.
magit-menu-common-valueSee function ‘magit-menu-common-value’.
magit-root-sectionThe root section in the current buffer.
magit-section-cache-visibilityWhether to cache visibility of sections.
magit-section-disable-line-numbersIn Magit buffers, whether to disable modes that display line numbers.
magit-section-heading-mapKeymap used in the heading line of all expandable sections.
magit-section-highlight-currentWhether to highlight the current section.
magit-section-highlight-selectionWhether to highlight the selected sections.
magit-section-highlighted-sectionsList of highlighted sections that may have to be repainted on focus change.
magit-section-initial-visibility-alistAlist controlling the initial visibility of sections.
magit-section-keep-region-overlayWhether to keep the region overlay when there is a valid selection.
magit-section-mode-abbrev-tableAbbrev table for ‘magit-section-mode’.
magit-section-mode-hookHook run after entering ‘magit-section-mode’.
magit-section-mode-mapParent keymap for keymaps of modes derived from ‘magit-section-mode’.
magit-section-mode-syntax-tableSyntax table for ‘magit-section-mode’.
magit-section-movement-hookHook run by ‘magit-section-goto’.
magit-section-set-visibility-hookHook used to set the initial visibility of a section.
magit-section-show-child-countWhether to append the number of children to section headings.
magit-section-visibility-indicatorsWhether and how to indicate that a section can be expanded/collapsed.

Defined functions (132)

context-menu-region@magit-section-mode(FN MENU CLICK)
isearch-clean-overlays@magit-mode(FN)
magit--add-face-text-property(BEG END FACE &optional APPEND OBJECT ADOPT-FACE)
magit--bol-position(POS)
magit--bolp(POS)
magit--eol-position(POS)
magit--eolp(POS)
magit--handle-bookmark(BOOKMARK)
magit--imenu-goto-function(NAME POSITION &rest REST)
magit--imenu-index-name(SECTION)
magit--make-bookmark()
magit--menu-position-keys(DEF)
magit--overlay-at(POS PROP &optional (VAL nil SVAL) TESTFN)
magit--propertize-face(STRING FACE)
magit--put-face(BEG END FACE STRING)
magit-add-section-hook(HOOK FUNCTION &optional AT APPEND LOCAL)
magit-bookmark--get-child-value(SECTION)
magit-bookmark-get-buffer-create(BOOKMARK MODE)
magit-bookmark-get-filename()
magit-bookmark-get-value(BOOKMARK MODE)
magit-bookmark-name()
magit-cancel-section(&optional IF-EMPTY)
magit-current-section()
magit-define-section-jumper(NAME HEADING TYPE &optional VALUE INSERTER &rest PROPERTIES)
magit-describe-section(SECTION &optional INTERACTIVE-P)
magit-describe-section-briefly(&optional SECTION IDENT INTERACTIVE)
magit-disable-section-inserter(FN)
magit-face-property-all(FACE STRING)
magit-focused-sections()
magit-get-section(IDENT &optional ROOT)
magit-insert-child-count(SECTION)
magit-insert-headers(HOOK)
magit-insert-heading([CHILD-COUNT] &rest STRINGS)
magit-insert-section([NAME] (CLASS &optional VALUE HIDE) &rest BODY)
magit-insert-section--create(CLASS VALUE HIDE &rest ARGS)
magit-insert-section--finish(OBJ)
magit-insert-section-body(&rest BODY)
magit-map-sections(FUNCTION &optional SECTION)
magit-menu--desc-values(SECTION)
magit-menu-common-value(SECTION)
magit-menu-format-desc(FORMAT)
magit-menu-item(DESC DEF &optional PROPS)
magit-menu-position()
magit-mouse-set-point(EVENT &optional PROMOTE-TO-REGION)
magit-mouse-toggle-section(EVENT)
magit-point()
magit-region-sections(&optional CONDITION MULTIPLE)
magit-region-values(&optional CONDITION MULTIPLE)
magit-run-section-hook(HOOK &rest ARGS)
magit-section(&rest SLOTS)
magit-section--eieio-childp(OBJ)
magit-section--highlight-region(START END WINDOW ROL)
magit-section--open-temporarily(BEG END)
magit-section--opportunistic-paint(SECTION)
magit-section--opportunistic-wash(SECTION)
magit-section--refine(ARG &rest ARGS)
magit-section--remove-text-properties(STRING)
magit-section--set-section-properties(SECTION)
magit-section--unhighlight-region(ROL)
magit-section-at(&optional POSITION)
magit-section-backward()
magit-section-backward-sibling()
magit-section-cache-visibility(&optional (SECTION magit-insert-section--current))
magit-section-cached-visibility(SECTION)
magit-section-case(&rest CLAUSES)
magit-section-child-p(OBJ)
magit-section-content-p(SECTION)
magit-section-context-menu(MENU CLICK)
magit-section-cycle(SECTION)
magit-section-cycle-global()
magit-section-equal(A B)
magit-section-forward()
magit-section-forward-sibling()
magit-section-get-relative-position(SECTION)
magit-section-goto(ARG)
magit-section-goto-successor()
magit-section-goto-successor--related(SECTION)
magit-section-goto-successor--related-1(SECTION)
magit-section-goto-successor--same(SECTION LINE CHAR)
magit-section-hidden(SECTION)
magit-section-hidden-body(SECTION &optional PRED)
magit-section-hide(SECTION)
magit-section-hide-children(SECTION)
magit-section-highlight(ARG &rest ARGS)
magit-section-highlight-range(START END &optional FACE)
magit-section-highlight-selection(SELECTION)
magit-section-ident(SECTION)
magit-section-ident-value(OBJECT)
magit-section-internal-region-p(&optional SECTION)
magit-section-invisible-p(SECTION)
magit-section-lineage(SECTION &optional RAW)
magit-section-match(CONDITION &optional (SECTION (magit-current-section)))
magit-section-match-1(CONDITION SECTION)
magit-section-match-2(CONDITION SECTION)
magit-section-match-assoc(SECTION ALIST)
magit-section-maybe-add-heading-map(SECTION)
magit-section-maybe-cache-visibility(&optional (SECTION magit-insert-section--current))
magit-section-maybe-remove-heading-map(SECTION)
magit-section-maybe-remove-visibility-indicator(SECTION)
magit-section-maybe-update-visibility-indicator(SECTION)
magit-section-mode()
magit-section-p(OBJ)
magit-section-paint(ARG &rest ARGS)
magit-section-parent-value(SECTION)
magit-section-position-in-heading-p(&optional SECTION POS)
magit-section-reveal(SECTION)
magit-section-selected-p(SECTION &optional (SELECTION nil SSELECTION))
magit-section-selective-highlight-p(SECTION &optional AS-CHILD)
magit-section-set-window-start(SECTION)
magit-section-show(SECTION)
magit-section-show-children(SECTION &optional DEPTH)
magit-section-show-children-1(SECTION &optional DEPTH)
magit-section-show-headings(SECTION)
magit-section-show-headings-1(SECTION)
magit-section-show-level(LEVEL)
magit-section-show-level-1()
magit-section-show-level-1-all()
magit-section-show-level-2()
magit-section-show-level-2-all()
magit-section-show-level-3()
magit-section-show-level-3-all()
magit-section-show-level-4()
magit-section-show-level-4-all()
magit-section-siblings(SECTION &optional DIRECTION)
magit-section-toggle(SECTION)
magit-section-toggle-children(SECTION)
magit-section-up()
magit-section-update-highlight(&optional FORCE)
magit-section-update-paint(SECTION FOCUSED-SECTIONS)
magit-section-value-if(CONDITION &optional SECTION)
magit-thing-at-point(THING &optional NO-PROPERTIES)
magit-wash-sequence(FUNCTION)

Defined faces (6)

magit-left-marginFace used for the left margin. Currently this is only used for section visibility indicators, and only when ‘magit-section-visibility-indicators’ is configured to show them in the margin. Due to limitations of how the margin works in Emacs, this is only used for those parts of the margin that actually display an indicator. For that reason you should probably avoid setting the background color. Reasonable values include ((t)), which causes the indicator to inherit the look of the heading (including section highlighting, if any), and ((t :inherit default), which prevents that and causes the margin to look like regular un-styled text in the buffer. Building on that, you can make it look different, e.g., ((t :inherit default :weight bold).
magit-section-child-countFace used for child counts at the end of some section headings.
magit-section-headingFace for section headings.
magit-section-heading-selectionFace for selected section headings.
magit-section-highlightFace for highlighting the current section.
magit-section-secondary-headingFace for section headings of some secondary headings.