Function: logview-toggle-narrow-to-section-headers

logview-toggle-narrow-to-section-headers is an interactive and natively compiled function defined in logview.el.

Signature

(logview-toggle-narrow-to-section-headers &optional ARG SET-VIEW-IF-NEEDED)

Documentation

Toggle whether only sections headers are shown.

Leaving only section headers visible is useful for long-distance navigation, i.e. when you want to find and switch to a completely different part of the log. Section headers, typically, should provide a good overview of log structure.

If invoked with prefix argument, leave only headers visible if the argument is positive, show full sections otherwise otherwise.

If this command is used when performing an incremental search
(with \<logview-isearch-map>M-x logview-toggle-narrow-to-section-headers (logview-toggle-narrow-to-section-headers)), the change is temporary and lasts only until the
search is ended. This is for consistency with e.g. M-s or M-r during Isearch.

Key Bindings

logview-isearch-map M-h logview-mode-map c h

Source Code

;; Defined in /nix/store/3zkn9hgpv447zb8nrg55d9x2ynmmrk40-emacs-packages-deps/share/emacs/site-lisp/elpa/logview-20260218.2013/logview.el
(defun logview-toggle-narrow-to-section-headers (&optional arg set-view-if-needed)
  "Toggle whether only sections headers are shown.
Leaving only section headers visible is useful for long-distance
navigation, i.e. when you want to find and switch to a completely
different part of the log.  Section headers, typically, should
provide a good overview of log structure.

If invoked with prefix argument, leave only headers visible if
the argument is positive, show full sections otherwise otherwise.

If this command is used when performing an incremental search
(with `\\<logview-isearch-map>\\[logview-toggle-narrow-to-section-headers]'), the change is temporary and lasts only until the
search is ended.  This is for consistency with e.g. `M-s' or
`M-r' during Isearch."
  (interactive (list (or current-prefix-arg 'toggle)
                     ;; Don't have UI to pick a view if already searching.
                     (not isearch-mode)))
  (logview--ensure-section-view set-view-if-needed)
  (logview--toggle-option-locally 'logview--narrow-to-section-headers arg (called-interactively-p 'interactive)
                                  "Showing only section headers"
                                  "Showing both section headers and contents, as usually"
                                  (lambda ()
                                    (logview--parse-filters)
                                    (logview--isearch-update-if-running))))