Function: magit-describe-section-briefly

magit-describe-section-briefly is an interactive and byte-compiled function defined in magit-section.el.

Signature

(magit-describe-section-briefly &optional SECTION IDENT INTERACTIVE)

Documentation

Show information about SECTION or the section at point.

With a prefix argument show the section identity instead of the section lineage. This command is intended for debugging purposes. Non-interactively, just return the information. Interactively, or when INTERACTIVE is non-nil, show the section in the echo area.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-section-20260330.1102/magit-section.el
;;;; Auxiliary

(defun magit-describe-section-briefly (&optional section ident interactive)
  "Show information about SECTION or the section at point.
With a prefix argument show the section identity instead of the
section lineage.  This command is intended for debugging purposes.
Non-interactively, just return the information.  Interactively,
or when INTERACTIVE is non-nil, show the section in the echo area."
  (interactive (list (magit-current-section) current-prefix-arg t))
  (unless section
    (setq section (magit-current-section)))
  (let ((str (format "#<%s %S %S %s-%s%s>"
                     (eieio-object-class section)
                     (let ((val (oref section value)))
                       (cond ((stringp val)
                              (substring-no-properties val))
                             ((and (eieio-object-p val)
                                   (fboundp 'cl-prin1-to-string))
                              (cl-prin1-to-string val))
                             (val)))
                     (if ident
                         (magit-section-ident section)
                       (apply #'vector (magit-section-lineage section)))
                     (and$ (oref section start)
                           (if (markerp $) (marker-position $) $))
                     (if-let ((m (oref section content)))
                         (format "[%s-]"
                                 (if (markerp m) (marker-position m) m))
                       "")
                     (and$ (oref section end)
                           (if (markerp $) (marker-position $) $)))))
    (when interactive
      (message "%s" str))
    str))