Function: logview-append-log-file-tail

logview-append-log-file-tail is an interactive and natively compiled function defined in logview.el.

Signature

(logview-append-log-file-tail)

Documentation

Load log file tail into the buffer preserving active filters.

This command won't ask for confirmation, but cannot be used if the buffer is modified.

Before loading the tail it verifies that preceding contents matches that of the buffer. The command does that by comparing logview-reassurance-chars immediately before the tail with the end of the buffer. This is of course not fool-proof, but for log files almost always good enough, especially if they contain timestamps.

This can be seen as an alternative to auto-revert-tail-mode: instead of automatic reverting you ask for it explicitly. It should be as simple as typing \<logview-mode-map>M-x logview-append-log-file-tail (logview-append-log-file-tail), as no confirmations are asked.

Key Bindings

logview-mode-map x

Source Code

;; Defined in /nix/store/3zkn9hgpv447zb8nrg55d9x2ynmmrk40-emacs-packages-deps/share/emacs/site-lisp/elpa/logview-20260218.2013/logview.el
(defun logview-append-log-file-tail ()
  "Load log file tail into the buffer preserving active filters.
This command won't ask for confirmation, but cannot be used if
the buffer is modified.

Before loading the tail it verifies that preceding contents
matches that of the buffer.  The command does that by comparing
`logview-reassurance-chars' immediately before the tail with the
end of the buffer. This is of course not fool-proof, but for log
files almost always good enough, especially if they contain
timestamps.

This can be seen as an alternative to `auto-revert-tail-mode':
instead of automatic reverting you ask for it explicitly.  It
should be as simple as typing `\\<logview-mode-map>\\[logview-append-log-file-tail]', as no confirmations are asked."
  (interactive)
  (when (buffer-modified-p)
    (user-error "Cannot append file tail to a modified buffer"))
  (logview--do-append-log-file-tail))