Function: logview-refresh-buffer-as-needed

logview-refresh-buffer-as-needed is an interactive and natively compiled function defined in logview.el.

Signature

(logview-refresh-buffer-as-needed)

Documentation

Append log file tail or else revert the whole buffer.

This is conceptually the same as typing \<logview-mode-map>M-x logview-append-log-file-tail (logview-append-log-file-tail), followed by \<logview-mode-map>M-x logview-revert-buffer (logview-revert-buffer) if the first command fails.

This command is faster than reloading the whole buffer in the common case when the log file grows by appending. Unlike logview-append-log-file-tail, it works in all cases, falling back to full revert if the file appears to have changed in a different way.

In all cases the current filters are preserved.

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-refresh-buffer-as-needed ()
  "Append log file tail or else revert the whole buffer.
This is conceptually the same as typing `\\<logview-mode-map>\\[logview-append-log-file-tail]', followed by `\\<logview-mode-map>\\[logview-revert-buffer]' if the
first command fails.

This command is faster than reloading the whole buffer in the
common case when the log file grows by appending.  Unlike
`logview-append-log-file-tail', it works in all cases, falling
back to full revert if the file appears to have changed in a
different way.

In all cases the current filters are preserved."
  (interactive)
  (unless (and (not (buffer-modified-p)) (logview--do-append-log-file-tail t))
    (logview-revert-buffer)))