Function: logview-prepare-for-new-contents

logview-prepare-for-new-contents is an interactive and natively compiled function defined in logview.el.

Signature

(logview-prepare-for-new-contents)

Documentation

Prepare the log buffer for new contents, ignoring existing one.

This refreshes buffer as needed, widens it, goes to the last entry and then narrows so that all already existing entries are hidden. The result is a buffer that appears empty (only one entry is shown for context) and will be filled with new contents once you issue command \<logview-mode-map>M-x logview-refresh-buffer-as-needed (logview-refresh-buffer-as-needed).

This seemingly weird sequence of commands is very useful when you want to concentrate on log contents between issuing the command and until \<logview-mode-map>M-x logview-refresh-buffer-as-needed (logview-refresh-buffer-as-needed).

Key Bindings

logview-mode-map G

Source Code

;; Defined in /nix/store/3zkn9hgpv447zb8nrg55d9x2ynmmrk40-emacs-packages-deps/share/emacs/site-lisp/elpa/logview-20260218.2013/logview.el
(defun logview-prepare-for-new-contents ()
  "Prepare the log buffer for new contents, ignoring existing one.
This refreshes buffer as needed, widens it, goes to the last
entry and then narrows so that all already existing entries are
hidden.  The result is a buffer that appears empty (only one
entry is shown for context) and will be filled with new contents
once you issue command `\\<logview-mode-map>\\[logview-refresh-buffer-as-needed]'.

This seemingly weird sequence of commands is very useful when you
want to concentrate on log contents between issuing the command
and until `\\<logview-mode-map>\\[logview-refresh-buffer-as-needed]'."
  (interactive)
  (logview-refresh-buffer-as-needed)
  (logview-widen)
  (logview-last-entry t)
  (logview-narrow-from-this-entry))