Function: erc-stamp-prefix-log-filter
erc-stamp-prefix-log-filter is an autoloaded and byte-compiled
function defined in erc-stamp.el.gz.
Signature
(erc-stamp-prefix-log-filter TEXT)
Documentation
Prefix every message in the buffer with a stamp.
Remove trailing stamps as well. For now, hard code the format to
"ZNC"-log style, which is [HH:MM:SS]. Expect to be used as a
erc-log-filter-function when erc-timestamp-use-align-to is
non-nil.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-stamp.el.gz
;;;###autoload
(defun erc-stamp-prefix-log-filter (text)
"Prefix every message in the buffer with a stamp.
Remove trailing stamps as well. For now, hard code the format to
\"ZNC\"-log style, which is [HH:MM:SS]. Expect to be used as a
`erc-log-filter-function' when `erc-timestamp-use-align-to' is
non-nil."
(insert text)
(goto-char (point-min))
(while
(progn
(when-let* (((< (point) (pos-eol)))
(end (1- (pos-eol)))
((eq 'erc-timestamp (field-at-pos end)))
(beg (field-beginning end))
;; Skip a line that's just a timestamp.
((> beg (point))))
(delete-region beg (1+ end)))
(when-let* ((time (erc--get-inserted-msg-prop 'erc--ts)))
(insert (format-time-string "[%H:%M:%S] " time)))
(zerop (forward-line))))
"")