aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorF. Jason Park2023-09-21 23:54:31 -0700
committerF. Jason Park2023-10-13 07:47:01 -0700
commitc68dc7786fc808b1ff7deb32d9964ae860e26f1e (patch)
treeaca267ad4f077d1778449a985d1f13176014579f /test
parenta4bae965e06c982871cf01bb0fc3afc43c915bc5 (diff)
downloademacs-c68dc7786fc808b1ff7deb32d9964ae860e26f1e.tar.gz
emacs-c68dc7786fc808b1ff7deb32d9964ae860e26f1e.zip
Manage some text props for ERC insertion-hook members
* etc/ERC-NEWS: Mention that ERC only adds the text property `cursor-sensor-functions' when `erc-echo-timestamps' is enabled. Also mention that date stamps are now inserted as separate messages. * lisp/erc/erc-fill.el (erc-fill): Look for text prop `erc-cmd' instead of `erc-command' and use helper utility to do so. (erc-fill-static): Skip date stamps because this fill style leaves them flush left. (erc-fill-wrap-mode, erc-fill-wrap-enable, erc-fill-wrap-disable): Don't hook on the soon-to-be-removed function interface `erc-stamp--insert-date-function' because date stamps are now separate messages. (erc-fill--wrap-continued-message-p): Restore accidentally discarded doc string. Derive context about current message from text props at `point-min', and use updated property names and utility functions. Abort when previous message is now hidden. (erc-fill--wrap-stamp-insert-prefixed-date): Remove unused function, originally meant to be new in ERC 5.6, and move logic for date-stamp measuring portion directly to `erc-fill-wrap' itself. (erc-fill--wrap-measure): New helper function. (erc-fill-wrap): Use helper `erc-fill--wrap-measure' and incorporate date-stamp detection and width measuring from removed helper. Don't dedent first word for messages of unknown origin, such as those inserted by `erc-display-line' alone without prior preparation from `erc-display-message'. * lisp/erc/erc-goodies.el (erc-readonly-mode, erc-readonly-enable): Set hook depth explicitly to 70. * lisp/erc/erc-stamp.el (erc-timestamp-format-left): Mention that a trailing newline is implicit if not provided and that users who don't want date stamps should use `erc-timestamp-format-right' instead. (erc-stamp-mode, erc-stamp-enable): Call `erc-stamp--setup' instead of `erc-munge-invisibility-spec', and bump hook depth for `erc-add-timestamp' to 70. (erc-stamp--current-time): Use `erc-ts' instead of `erc-timestamp' text property in doc string. (erc-stamp--skip): New internal variable. (erc-stamp--allow-unmanaged): New variable for legacy code to force `erc-add-timestamps' to run when `erc--msg-props' is nil. (erc-add-timestamp): Always run when `erc-stamp--allow-unmanaged' is non-nil unless `erc-stamp--skip' is as well because the latter takes precedence. Don't add `erc-ts' text prop directly unless `erc-stamp--allow-unmanaged is non-nil. Instead, use the new `erc--msg-props' facility to defer until after modification hooks. Likewise, don't add `cursor-senor-functions' directly either unless the same compatibility flag is enabled. Instead, expect the latter to be handled by a post-modify hook conditioned on the option `erc-echo-timestamps'. (erc-timestamp-last-inserted-left): Mention that the final trailing newline specified in the format string no longer appears in the recorded value. (erc-stamp-prefix-log-filter): Use updated name for timestamp property as well as helper utility for accessing it. (erc-stamp--inherited-props): Add doc string. (erc-insert-timestamp-right): Fix bug involving object cycle where the time-stamp string would appear in its own `display' property. (erc-stamp--insert-date-function, erc-stamp--insert-date-hook): Remove unused internal function-valued interface variable and replace with the latter, a normal hook. (erc-stamp--date-format-end, erc-stamp--propertize-left-date-stamp): New function and auxiliary variable to apply date stamp properties at the post-modify stage. Add text property `erc-stamp-type' to inserted date stamps to help folks distinguish between them and other left-sided stamps. (erc-stamp--current-datestamp-left, erc-stamp--format-date-stamp, erc-stamp--insert-date-stamp-as-phony-message, erc-stamp--lr-date-on-pre-modify): New functions and state variable to help ERC treat date stamps as separate messages while working within the established mechanism for processing inserted messages. Shadow `erc-stamp--invisible-property' when calling `erc-format-timestamp' in order to prevent date stamps from inheriting other `invisible' props. These date stamps are special in that they have no business being hidden along with the current message. (erc-insert-timestamp-left-and-right): On initial run in any buffer, remember whether the date stamp needed newline massaging on insertion. Move all business for inserting date stamps to post-modify hooks, but run them forcibly if this is the very first date stamp in the current buffer. Also mention some specifics related to relevant text props in the doc string. (erc-format-timestamp): Don't add `invisible' prop to stamp unless `erc-stamp--invisible-property' is non-nil. (erc-stamp--csf-props-updated-p): New local variable. (erc-munge-invisibility-spec): Restore `cursor-sensor-functions' text property for existing messages when a user enables the option mid-session. Add and remove hooks for use with automatic timestamp echoing. (erc-stamp--add-csf-on-post-modify): New function to add `cursor-sensor-functions' property on post-modify hooks. (erc-stamp--setup): Perform some additional teardown. (erc-stamp--on-clear-message): Look for text property `erc-ts' instead of `erc-timestamp'. (erc-echo-timestamp, erc--echo-ts-csf): Use utility to find time-stamp text prop in current message. (erc-stamp--update-saved-position, erc-stamp--reset-on-clear): Use hook `erc-stamp--insert-date-hook' instead of excised function-valued variable interface `erc-stamp--insert-date-function'. * lisp/erc/erc-truncate.el (erc-truncate-buffer-to-size): Use internal utility to find beginning of message. * lisp/erc/erc.el (erc--msg-props, erc--msg-props-overrides): New internal variables for initializing and conveying metadata-oriented text properties among insert and send hooks. (erc-insert-modify-hook): Mention reserved depth ranges for built-in members in doc string. (erc-send-action): Use convenience variable to modifying text props instead of awkwardly overriding `erc-insert-pre-hook'. (erc--check-msg-prop, erc--get-inserted-msg-bounds, erc--get-inserted-msg-prop, erc--with-inserted-msg, erc--traverse-inserted): New utility functions and macros to help modules find metadata and message-delimiting text props. (erc-display-line-1): Ensure the first character of every message in an ERC buffer has the `erc-msg' property, as well as any other props in `erc--msg-props', when populated. (erc--hide-message): Don't bother offsetting start of first message in a buffer. (erc--ranked-properties, erc--order-text-properties-from-hash): New variable and function to convert `erc--msg-props' into a plist suitable for `add-text-properties'. (erc-display-message): Make doc string more informative. Bind and initialize `erc--msg-props' for use by all hooks. Respect `erc--msg-prop-overrides' when non-nil. Don't add `erc-command' property. Instead, ensure `erc--msg-props' contains an `erc-cmd' item when the parameter PARSED is non-nil. (erc--own-property-names): Add `erc-stamp-type'. (erc--get-speaker-bounds): Use helper to find message start. (erc-process-ctcp-query, erc-send-current-line): Use convenience variable to leverage framework for manipulating message metadata instead of overriding `erc-insert-pre-hook'. (erc-display-msg): Bind `erc--msg-props' for use by all send-related hooks. Add text props from table after `erc-send-post-hook'. (erc-restore-text-properties): Improve doc string. (erc--get-eq-comparable-cmd): Use `if-let' instead of `if-let*'. * test/lisp/erc/erc-fill-tests.el (erc-fill-tests--insert-privmsg): Make phony message more realistic. (erc-fill-tests--wrap-populate): Shorten overlong line. (erc-fill-tests--wrap-check-prefixes): Make test utility more vigilant in asserting no gaps exist in `line-prefix' property interval. (erc-fill-tests--compare): Compare text props on text-prop values that are themselves strings. * test/lisp/erc/erc-scenarios-log.el (erc-scenarios-log--clear-stamp): Ensure `erc-stamp' is loaded. * test/lisp/erc/erc-scenarios-match.el (erc-scenarios-match--stamp-left-current-nick, erc-scenarios-match--invisible-stamp): Use `default-value' for `erc-insert-modify-hook' in ordering assertion. (erc-scenarios-match--find-bol, erc-scenarios-match--find-eol): Remove unused assertion helper functions. (erc-scenarios-match--stamp-right-fools-invisible): Remove misplaced ERT tag from function and use utility to find message bounds. (erc-scenarios-match--stamp-right-fools-invisible): Use real utility from main library to find message end. (erc-scenarios-match--fill-wrap-stamp-dedented-p): New assertion utility function. (erc-scenarios-match--hide-fools/stamp-both/fill-wrap) New test. (erc-scenarios-match--hide-fools/stamp-both/fill-wrap/speak): New test. (erc-scenarios-match--stamp-both-invisible-fill-static): Expect `erc-cmd' at beginning of inserted message's filled line, even if the line starts with white space. Also, add new function parameter `assert-ds', a callback to run when visiting the second date stamp, which is followed by a hidden message. In the test of the same name, expect the date stamp's invisibility interval to begin at the newline after the previous message and to not contain any existing invisibility props, namely, those belonging to the subsequent hidden "fools" message. Also use shortened "metadata" text prop names. (erc-scenarios-match--stamp-both-invisible-fill-static--nooffset): Expect the date stamp's invisibility interval to match its field's instead of starting and ending sooner. * test/lisp/erc/erc-stamp-tests.el: Put well-known metadata prop at the start of the message. * test/lisp/erc/erc-tests.el (erc--refresh-prompt): Prevent modules from mutating hooks. (erc--order-text-properties-from-hash, erc--check-msg-prop): New tests. * test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: Update test data. * test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: Update test data. * test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld: Update. * test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld: Update. * test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld: Update. * test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld: Update. * test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld: Update. * test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld: Update. * test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld: Update. * test/lisp/erc/resources/match/fools/fill-wrap.eld: New file. (Bug#60936)
Diffstat (limited to 'test')
-rw-r--r--test/lisp/erc/erc-fill-tests.el60
-rw-r--r--test/lisp/erc/erc-scenarios-log.el1
-rw-r--r--test/lisp/erc/erc-scenarios-match.el260
-rw-r--r--test/lisp/erc/erc-stamp-tests.el2
-rw-r--r--test/lisp/erc/erc-tests.el43
-rw-r--r--test/lisp/erc/resources/fill/snapshots/merge-01-start.eld2
-rw-r--r--test/lisp/erc/resources/fill/snapshots/merge-02-right.eld2
-rw-r--r--test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld2
-rw-r--r--test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld2
-rw-r--r--test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld2
-rw-r--r--test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld2
-rw-r--r--test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld2
-rw-r--r--test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld2
-rw-r--r--test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld2
-rw-r--r--test/lisp/erc/resources/match/fools/fill-wrap.eld41
15 files changed, 357 insertions, 68 deletions
diff --git a/test/lisp/erc/erc-fill-tests.el b/test/lisp/erc/erc-fill-tests.el
index b81d0c15558..8f0c8f9ccf4 100644
--- a/test/lisp/erc/erc-fill-tests.el
+++ b/test/lisp/erc/erc-fill-tests.el
@@ -31,10 +31,14 @@
31 31
32(defun erc-fill-tests--insert-privmsg (speaker &rest msg-parts) 32(defun erc-fill-tests--insert-privmsg (speaker &rest msg-parts)
33 (declare (indent 1)) 33 (declare (indent 1))
34 (let ((msg (erc-format-privmessage speaker 34 (let* ((msg (erc-format-privmessage speaker
35 (apply #'concat msg-parts) nil t))) 35 (apply #'concat msg-parts) nil t))
36 (put-text-property 0 (length msg) 'erc-command 'PRIVMSG msg) 36 ;; (erc--msg-prop-overrides '((erc-msg . msg) (erc-cmd . PRIVMSG)))
37 (erc-display-message nil nil (current-buffer) msg))) 37 (parsed (make-erc-response :unparsed msg :sender speaker
38 :command "PRIVMSG"
39 :command-args (list "#chan" msg)
40 :contents msg)))
41 (erc-display-message parsed nil (current-buffer) msg)))
38 42
39(defun erc-fill-tests--wrap-populate (test) 43(defun erc-fill-tests--wrap-populate (test)
40 (let ((original-window-buffer (window-buffer (selected-window))) 44 (let ((original-window-buffer (window-buffer (selected-window)))
@@ -75,8 +79,8 @@
75 79
76 (erc-fill-tests--insert-privmsg "alice" 80 (erc-fill-tests--insert-privmsg "alice"
77 "bob: come, you are a tedious fool: to the purpose. " 81 "bob: come, you are a tedious fool: to the purpose. "
78 "What was done to Elbow's wife, that he hath cause to complain of? " 82 "What was done to Elbow's wife, that he hath cause to complain of?"
79 "Come me to what was done to her.") 83 " Come me to what was done to her.")
80 84
81 ;; Introduce an artificial gap in properties `line-prefix' and 85 ;; Introduce an artificial gap in properties `line-prefix' and
82 ;; `wrap-prefix' and later ensure they're not incremented twice. 86 ;; `wrap-prefix' and later ensure they're not incremented twice.
@@ -111,6 +115,14 @@
111 (should (get-text-property (pos-bol) 'line-prefix)) 115 (should (get-text-property (pos-bol) 'line-prefix))
112 (should (get-text-property (1- (pos-eol)) 'line-prefix)) 116 (should (get-text-property (1- (pos-eol)) 'line-prefix))
113 (should-not (get-text-property (pos-eol) 'line-prefix)) 117 (should-not (get-text-property (pos-eol) 'line-prefix))
118 ;; Spans entire line uninterrupted.
119 (let* ((val (get-text-property (pos-bol) 'line-prefix))
120 (end (text-property-not-all (pos-bol) (point-max)
121 'line-prefix val)))
122 (when (and (/= end (pos-eol)) (= ?? (char-before end)))
123 (setq end (text-property-not-all (1+ end) (point-max)
124 'line-prefix val)))
125 (should (eq end (pos-eol))))
114 (should (equal (get-text-property (pos-bol) 'wrap-prefix) 126 (should (equal (get-text-property (pos-bol) 'wrap-prefix)
115 '(space :width erc-fill--wrap-value))) 127 '(space :width erc-fill--wrap-value)))
116 (should-not (get-text-property (pos-eol) 'wrap-prefix)) 128 (should-not (get-text-property (pos-eol) 'wrap-prefix))
@@ -145,7 +157,7 @@
145 (number-to-string erc-fill--wrap-value) 157 (number-to-string erc-fill--wrap-value)
146 (prin1-to-string got)))) 158 (prin1-to-string got))))
147 (with-current-buffer (generate-new-buffer name) 159 (with-current-buffer (generate-new-buffer name)
148 (push name erc-fill-tests--buffers) 160 (push (current-buffer) erc-fill-tests--buffers)
149 (with-silent-modifications 161 (with-silent-modifications
150 (insert (setq got (read repr)))) 162 (insert (setq got (read repr))))
151 (erc-mode)) 163 (erc-mode))
@@ -153,15 +165,31 @@
153 (with-temp-file expect-file 165 (with-temp-file expect-file
154 (insert repr)) 166 (insert repr))
155 (if (file-exists-p expect-file) 167 (if (file-exists-p expect-file)
156 ;; Compare set-equal over intervals. This comparison is 168 ;; Ensure string-valued properties, like timestamps, aren't
157 ;; less useful for messages treated by other modules because 169 ;; recursive (signals `max-lisp-eval-depth' exceeded).
158 ;; it doesn't compare "nested" props belonging to 170 (named-let assert-equal
159 ;; string-valued properties, like timestamps. 171 ((latest (read repr))
160 (should (equal-including-properties 172 (expect (read (with-temp-buffer
161 (read repr) 173 (insert-file-contents-literally expect-file)
162 (read (with-temp-buffer 174 (buffer-string)))))
163 (insert-file-contents-literally expect-file) 175 (pcase latest
164 (buffer-string))))) 176 ((or "" 'nil) t)
177 ((pred stringp)
178 (should (equal-including-properties latest expect))
179 (let ((latest-intervals (object-intervals latest))
180 (expect-intervals (object-intervals expect)))
181 (while-let ((l-iv (pop latest-intervals))
182 (x-iv (pop expect-intervals))
183 (l-tab (map-into (nth 2 l-iv) 'hash-table))
184 (x-tab (map-into (nth 2 x-iv) 'hash-table)))
185 (pcase-dolist (`(,l-k . ,l-v) (map-pairs l-tab))
186 (assert-equal l-v (gethash l-k x-tab))
187 (remhash l-k x-tab))
188 (should (zerop (hash-table-count x-tab))))))
189 ((pred sequencep)
190 (assert-equal (seq-first latest) (seq-first expect))
191 (assert-equal (seq-rest latest) (seq-rest expect)))
192 (_ (should (equal latest expect)))))
165 (message "Snapshot file missing: %S" expect-file))))) 193 (message "Snapshot file missing: %S" expect-file)))))
166 194
167;; To inspect variable pitch, set `erc-mode-hook' to 195;; To inspect variable pitch, set `erc-mode-hook' to
diff --git a/test/lisp/erc/erc-scenarios-log.el b/test/lisp/erc/erc-scenarios-log.el
index fd030d90c2f..f7e7d61c92e 100644
--- a/test/lisp/erc/erc-scenarios-log.el
+++ b/test/lisp/erc/erc-scenarios-log.el
@@ -81,6 +81,7 @@
81 81
82(ert-deftest erc-scenarios-log--clear-stamp () 82(ert-deftest erc-scenarios-log--clear-stamp ()
83 :tags '(:expensive-test) 83 :tags '(:expensive-test)
84 (require 'erc-stamp)
84 (erc-scenarios-common-with-cleanup 85 (erc-scenarios-common-with-cleanup
85 ((erc-scenarios-common-dialog "base/assoc/bouncer-history") 86 ((erc-scenarios-common-dialog "base/assoc/bouncer-history")
86 (dumb-server (erc-d-run "localhost" t 'foonet)) 87 (dumb-server (erc-d-run "localhost" t 'foonet))
diff --git a/test/lisp/erc/erc-scenarios-match.el b/test/lisp/erc/erc-scenarios-match.el
index cd899fddb98..3da55572cf7 100644
--- a/test/lisp/erc/erc-scenarios-match.el
+++ b/test/lisp/erc/erc-scenarios-match.el
@@ -55,7 +55,8 @@
55 :nick "tester") 55 :nick "tester")
56 ;; Module `timestamp' follows `match' in insertion hooks. 56 ;; Module `timestamp' follows `match' in insertion hooks.
57 (should (memq 'erc-add-timestamp 57 (should (memq 'erc-add-timestamp
58 (memq 'erc-match-message erc-insert-modify-hook))) 58 (memq 'erc-match-message
59 (default-value 'erc-insert-modify-hook))))
59 ;; The "match type" is `current-nick'. 60 ;; The "match type" is `current-nick'.
60 (funcall expect 5 "tester") 61 (funcall expect 5 "tester")
61 (should (eq (get-text-property (1- (point)) 'font-lock-face) 62 (should (eq (get-text-property (1- (point)) 'font-lock-face)
@@ -91,7 +92,8 @@
91 :nick "tester") 92 :nick "tester")
92 ;; Module `timestamp' follows `match' in insertion hooks. 93 ;; Module `timestamp' follows `match' in insertion hooks.
93 (should (memq 'erc-add-timestamp 94 (should (memq 'erc-add-timestamp
94 (memq 'erc-match-message erc-insert-modify-hook))) 95 (memq 'erc-match-message
96 (default-value 'erc-insert-modify-hook))))
95 (funcall expect 5 "This server is in debug mode"))) 97 (funcall expect 5 "This server is in debug mode")))
96 98
97 (ert-info ("Ensure lines featuring \"bob\" are invisible") 99 (ert-info ("Ensure lines featuring \"bob\" are invisible")
@@ -151,29 +153,13 @@
151 (= (next-single-property-change msg-beg 'invisible nil (pos-eol)) 153 (= (next-single-property-change msg-beg 'invisible nil (pos-eol))
152 (pos-eol)))))))) 154 (pos-eol))))))))
153 155
154(defun erc-scenarios-match--find-bol ()
155 (save-excursion
156 (should (get-text-property (1- (point)) 'erc-command))
157 (goto-char (should (previous-single-property-change (point) 'erc-command)))
158 (pos-bol)))
159
160(defun erc-scenarios-match--find-eol ()
161 (save-excursion
162 (if-let ((next (next-single-property-change (point) 'erc-command)))
163 (goto-char next)
164 ;; We're already at the end of the message.
165 (should (get-text-property (1- (point)) 'erc-command)))
166 (pos-eol)))
167
168;; In most cases, `erc-hide-fools' makes line endings invisible. 156;; In most cases, `erc-hide-fools' makes line endings invisible.
169(defun erc-scenarios-match--stamp-right-fools-invisible () 157(defun erc-scenarios-match--stamp-right-fools-invisible ()
170 :tags '(:expensive-test)
171 (let ((erc-insert-timestamp-function #'erc-insert-timestamp-right)) 158 (let ((erc-insert-timestamp-function #'erc-insert-timestamp-right))
172 (erc-scenarios-match--invisible-stamp 159 (erc-scenarios-match--invisible-stamp
173 160
174 (lambda () 161 (lambda ()
175 (let ((beg (erc-scenarios-match--find-bol)) 162 (pcase-let ((`(,beg . ,end) (erc--get-inserted-msg-bounds)))
176 (end (erc-scenarios-match--find-eol)))
177 ;; The end of the message is a newline. 163 ;; The end of the message is a newline.
178 (should (= ?\n (char-after end))) 164 (should (= ?\n (char-after end)))
179 165
@@ -205,7 +191,7 @@
205 (should (= (next-single-property-change msg-end 'invisible) end))))) 191 (should (= (next-single-property-change msg-end 'invisible) end)))))
206 192
207 (lambda () 193 (lambda ()
208 (let ((end (erc-scenarios-match--find-eol))) 194 (let ((end (erc--get-inserted-msg-bounds 'end)))
209 ;; This message has a time stamp like all the others. 195 ;; This message has a time stamp like all the others.
210 (should (eq (field-at-pos (1- end)) 'erc-timestamp)) 196 (should (eq (field-at-pos (1- end)) 'erc-timestamp))
211 197
@@ -271,7 +257,172 @@
271 (let ((inv-beg (next-single-property-change (1- (pos-bol)) 'invisible))) 257 (let ((inv-beg (next-single-property-change (1- (pos-bol)) 'invisible)))
272 (should (eq (get-text-property inv-beg 'invisible) 'timestamp))))))) 258 (should (eq (get-text-property inv-beg 'invisible) 'timestamp)))))))
273 259
274(defun erc-scenarios-match--stamp-both-invisible-fill-static () 260(defun erc-scenarios-match--fill-wrap-stamp-dedented-p (point)
261 (pcase (get-text-property point 'line-prefix)
262 (`(space :width (- erc-fill--wrap-value (,n)))
263 (if (display-graphic-p) (< 100 n 200) (< 10 n 30)))
264 (`(space :width (- erc-fill--wrap-value ,n))
265 (< 10 n 30))))
266
267(ert-deftest erc-scenarios-match--hide-fools/stamp-both/fill-wrap ()
268
269 ;; Rewind the clock to known date artificially. We should probably
270 ;; use a ticks/hz cons on 29+.
271 (let ((erc-stamp--current-time 704591940)
272 (erc-stamp--tz t)
273 (erc-fill-function #'erc-fill-wrap)
274 (bob-utterance-counter 0))
275
276 (erc-scenarios-match--invisible-stamp
277
278 (lambda ()
279 (ert-info ("Baseline check")
280 ;; False date printed initially before anyone speaks.
281 (when (zerop bob-utterance-counter)
282 (save-excursion
283 (goto-char (point-min))
284 (search-forward "[Wed Apr 29 1992]")
285 ;; First stamp in a buffer is not invisible from previous
286 ;; newline (before stamp's own leading newline).
287 (should (= 4 (match-beginning 0)))
288 (should (get-text-property 3 'invisible))
289 (should-not (get-text-property 2 'invisible))
290 (should (erc-scenarios-match--fill-wrap-stamp-dedented-p 4))
291 (search-forward "[23:59]"))))
292
293 (ert-info ("Line endings in Bob's messages are invisible")
294 ;; The message proper has the `invisible' property `match-fools'.
295 (should (eq (get-text-property (pos-bol) 'invisible) 'match-fools))
296 (pcase-let ((`(,mbeg . ,mend) (erc--get-inserted-msg-bounds)))
297 (should (= (char-after mend) ?\n))
298 (should-not (field-at-pos mend))
299 (should-not (field-at-pos mbeg))
300
301 (when (= bob-utterance-counter 1)
302 (let ((right-stamp (field-end mbeg)))
303 (should (eq 'erc-timestamp (field-at-pos right-stamp)))
304 (should (= mend (field-end right-stamp)))
305 (should (eq (field-at-pos (1- mend)) 'erc-timestamp))))
306
307 ;; The `erc-ts' property is present in prop stack.
308 (should (get-text-property (pos-bol) 'erc-ts))
309 (should-not (next-single-property-change (1+ (pos-bol)) 'erc-ts))
310
311 ;; Line ending has the `invisible' property `match-fools'.
312 (should (eq (get-text-property mbeg 'invisible) 'match-fools))
313 (should-not (get-text-property mend 'invisible))))
314
315 ;; Only the message right after Alice speaks contains stamps.
316 (when (= 1 bob-utterance-counter)
317
318 (ert-info ("Date stamp occupying previous line is invisible")
319 (should (eq 'match-fools (get-text-property (point) 'invisible)))
320 (save-excursion
321 (forward-line -1)
322 (goto-char (pos-bol))
323 (should (looking-at (rx "[Mon May 4 1992]")))
324 (ert-info ("Stamp's NL `invisible' as fool, not timestamp")
325 (let ((end (match-end 0)))
326 (should (eq (char-after end) ?\n))
327 (should (eq 'timestamp
328 (get-text-property (1- end) 'invisible)))
329 (should (eq 'match-fools
330 (get-text-property end 'invisible)))))
331 (should (erc-scenarios-match--fill-wrap-stamp-dedented-p (point)))
332 ;; Date stamp has a combined `invisible' property value
333 ;; that starts at the previous message's trailing newline
334 ;; and extends until the start of the message proper.
335 (should (equal ?\n (char-before (point))))
336 (should (equal ?\n (char-before (1- (point)))))
337 (let ((val (get-text-property (- (point) 2) 'invisible)))
338 (should (equal val 'timestamp))
339 (should (= (text-property-not-all (- (point) 2) (point-max)
340 'invisible val)
341 (pos-eol))))))
342
343 (ert-info ("Current message's RHS stamp is hidden")
344 ;; Right stamp has `match-fools' property.
345 (save-excursion
346 (should-not (field-at-pos (point)))
347 (should (eq (field-at-pos (1- (pos-eol))) 'erc-timestamp)))
348
349 ;; Stamp invisibility starts where message's ends.
350 (let ((msgend (next-single-property-change (pos-bol) 'invisible)))
351 ;; Stamp has a combined `invisible' property value.
352 (should (equal (get-text-property msgend 'invisible)
353 '(timestamp match-fools)))
354
355 ;; Combined `invisible' property spans entire timestamp.
356 (should (= (next-single-property-change msgend 'invisible)
357 (pos-eol))))))
358
359 (cl-incf bob-utterance-counter))
360
361 ;; Alice.
362 (lambda ()
363 ;; Set clock ahead a week or so.
364 (setq erc-stamp--current-time 704962800)
365
366 ;; This message has no time stamp and is completely visible.
367 (should-not (eq (field-at-pos (1- (pos-eol))) 'erc-timestamp))
368 (should-not (next-single-property-change (pos-bol) 'invisible))))))
369
370;; This asserts that speaker hiding by `erc-fill-wrap-merge' doesn't
371;; take place after a series of hidden fool messages with an
372;; intervening outgoing message followed immediately by a non-fool
373;; message from the last non-hidden speaker (other than the user).
374(ert-deftest erc-scenarios-match--hide-fools/stamp-both/fill-wrap/speak ()
375
376 (erc-scenarios-common-with-cleanup
377 ((erc-scenarios-common-dialog "match/fools")
378 (erc-stamp--current-time 704591940)
379 (dumb-server (erc-d-run "localhost" t 'fill-wrap))
380 (erc-stamp--tz t)
381 (erc-fill-function #'erc-fill-wrap)
382 (port (process-contact dumb-server :service))
383 (erc-server-flood-penalty 0.1)
384 (erc-timestamp-only-if-changed-flag nil)
385 (erc-fools '("bob"))
386 (erc-text-matched-hook '(erc-hide-fools))
387 (erc-autojoin-channels-alist '((FooNet "#chan")))
388 (expect (erc-d-t-make-expecter)))
389
390 (ert-info ("Connect")
391 (with-current-buffer (erc :server "127.0.0.1"
392 :port port
393 :full-name "tester"
394 :password "changeme"
395 :nick "tester")
396 ;; Module `timestamp' follows `match' in insertion hooks.
397 (should (memq 'erc-add-timestamp
398 (memq 'erc-match-message
399 (default-value 'erc-insert-modify-hook))))
400 (funcall expect 5 "This server is in debug mode")))
401
402 (ert-info ("Ensure lines featuring \"bob\" are invisible")
403 (with-current-buffer (erc-d-t-wait-for 10 (get-buffer "#chan"))
404 (should (funcall expect 10 "<alice> None better than"))
405 (should (funcall expect 10 "<alice> bob: Still we went"))
406 (should (funcall expect 10 "<bob> alice: Give me your hand"))
407 (erc-scenarios-common-say "hey")
408 (should (funcall expect 10 "<bob> You have paid the heavens"))
409 (should (funcall expect 10 "<alice> bob: In the sick air"))
410 (should (funcall expect 10 "<alice> The web of our life"))
411
412 ;; Regression (see leading comment).
413 (should-not (equal "" (get-text-property (pos-bol) 'display)))
414
415 ;; No remaining meta-data positions, no more timestamps.
416 (should-not (next-single-property-change (1+ (pos-bol)) 'erc-ts))
417 ;; No remaining invisible messages.
418 (should-not (text-property-not-all (pos-bol) erc-insert-marker
419 'invisible nil))
420
421 (should (funcall expect 10 "ERC>"))
422 (should-not (get-text-property (pos-bol) 'invisible))
423 (should-not (get-text-property (point) 'invisible))))))
424
425(defun erc-scenarios-match--stamp-both-invisible-fill-static (assert-ds)
275 (should (eq erc-insert-timestamp-function 426 (should (eq erc-insert-timestamp-function
276 #'erc-insert-timestamp-left-and-right)) 427 #'erc-insert-timestamp-left-and-right))
277 428
@@ -295,21 +446,20 @@
295 (ert-info ("Line endings in Bob's messages are invisible") 446 (ert-info ("Line endings in Bob's messages are invisible")
296 ;; The message proper has the `invisible' property `match-fools'. 447 ;; The message proper has the `invisible' property `match-fools'.
297 (should (eq (get-text-property (pos-bol) 'invisible) 'match-fools)) 448 (should (eq (get-text-property (pos-bol) 'invisible) 'match-fools))
298 (let* ((mbeg (next-single-property-change (pos-bol) 'erc-command)) 449 (pcase-let ((`(,mbeg . ,mend) (erc--get-inserted-msg-bounds)))
299 (mend (next-single-property-change mbeg 'erc-command)))
300 450
301 (if (/= 1 bob-utterance-counter) 451 (should (= (char-after mend) ?\n))
302 (should-not (field-at-pos mend)) 452 (should-not (field-at-pos mbeg))
453 (should-not (field-at-pos mend))
454 (when (= 1 bob-utterance-counter)
303 ;; For Bob's stamped message, check newline after stamp. 455 ;; For Bob's stamped message, check newline after stamp.
304 (should (eq (field-at-pos mend) 'erc-timestamp)) 456 (should (eq (field-at-pos (field-end mbeg)) 'erc-timestamp))
305 (setq mend (field-end mend))) 457 (should (eq (field-at-pos (1- mend)) 'erc-timestamp)))
306 458
307 ;; The `erc-timestamp' property spans entire messages, 459 ;; The `erc-ts' property is present in the message's
308 ;; including stamps and filled text, which makes for 460 ;; width 1 prop collection at its first char.
309 ;; convenient traversal when `erc-stamp-mode' is enabled. 461 (should (get-text-property (pos-bol) 'erc-ts))
310 (should (get-text-property (pos-bol) 'erc-timestamp)) 462 (should-not (next-single-property-change (1+ (pos-bol)) 'erc-ts))
311 (should (= (next-single-property-change (pos-bol) 'erc-timestamp)
312 mend))
313 463
314 ;; Line ending has the `invisible' property `match-fools'. 464 ;; Line ending has the `invisible' property `match-fools'.
315 (should (= (char-after mend) ?\n)) 465 (should (= (char-after mend) ?\n))
@@ -327,12 +477,8 @@
327 (forward-line -1) 477 (forward-line -1)
328 (goto-char (pos-bol)) 478 (goto-char (pos-bol))
329 (should (looking-at (rx "[Mon May 4 1992]"))) 479 (should (looking-at (rx "[Mon May 4 1992]")))
330 ;; Date stamp has a combined `invisible' property value 480 (should (= ?\n (char-after (- (point) 2)))) ; welcome!\n
331 ;; that extends until the start of the message proper. 481 (funcall assert-ds))) ; "assert date stamp"
332 (should (equal (get-text-property (point) 'invisible)
333 '(timestamp match-fools)))
334 (should (= (next-single-property-change (point) 'invisible)
335 (1+ (pos-eol))))))
336 482
337 (ert-info ("Folding preserved despite invisibility") 483 (ert-info ("Folding preserved despite invisibility")
338 ;; Message has a trailing time stamp, but it's been folded 484 ;; Message has a trailing time stamp, but it's been folded
@@ -365,13 +511,45 @@
365 511
366(ert-deftest erc-scenarios-match--stamp-both-invisible-fill-static () 512(ert-deftest erc-scenarios-match--stamp-both-invisible-fill-static ()
367 :tags '(:expensive-test) 513 :tags '(:expensive-test)
368 (erc-scenarios-match--stamp-both-invisible-fill-static)) 514 (erc-scenarios-match--stamp-both-invisible-fill-static
515
516 (lambda ()
517 ;; Date stamp has an `invisible' property that starts from the
518 ;; newline delimiting the current and previous messages and
519 ;; extends until the stamp's final newline. It is not combined
520 ;; with the old value, `match-fools'.
521 (let ((delim-pos (- (point) 2)))
522 (should (equal 'timestamp (get-text-property delim-pos 'invisible)))
523 ;; Stamp-only invisibility ends before its last newline.
524 (should (= (text-property-not-all delim-pos (point-max)
525 'invisible 'timestamp)
526 (match-end 0))))))) ; pos-eol
369 527
370(ert-deftest erc-scenarios-match--stamp-both-invisible-fill-static--nooffset () 528(ert-deftest erc-scenarios-match--stamp-both-invisible-fill-static--nooffset ()
371 :tags '(:expensive-test) 529 :tags '(:expensive-test)
372 (with-suppressed-warnings ((obsolete erc-legacy-invisible-bounds-p)) 530 (with-suppressed-warnings ((obsolete erc-legacy-invisible-bounds-p))
373 (should-not erc-legacy-invisible-bounds-p) 531 (should-not erc-legacy-invisible-bounds-p)
532
374 (let ((erc-legacy-invisible-bounds-p t)) 533 (let ((erc-legacy-invisible-bounds-p t))
375 (erc-scenarios-match--stamp-both-invisible-fill-static)))) 534 (erc-scenarios-match--stamp-both-invisible-fill-static
535
536 (lambda ()
537 ;; Date stamp has an `invisible' property that covers its
538 ;; format string exactly. It is not combined with the old
539 ;; value, `match-fools'.
540 (let ((delim-prev (- (point) 2)))
541 (should-not (get-text-property delim-prev 'invisible))
542 (should (eq 'erc-timestamp (field-at-pos (point))))
543 (should (= (next-single-property-change delim-prev 'invisible)
544 (field-beginning (point))))
545 (should (equal 'timestamp
546 (get-text-property (1- (point)) 'invisible)))
547 ;; Field stops before final newline because the date stamp
548 ;; is (now, as of ERC 5.6) its own standalone message.
549 (should (= ?\n (char-after (field-end (point)))))
550 ;; Stamp-only invisibility includes last newline.
551 (should (= (text-property-not-all (1- (point)) (point-max)
552 'invisible 'timestamp)
553 (1+ (field-end (point)))))))))))
376 554
377;;; erc-scenarios-match.el ends here 555;;; erc-scenarios-match.el ends here
diff --git a/test/lisp/erc/erc-stamp-tests.el b/test/lisp/erc/erc-stamp-tests.el
index 46a05729066..cc61d599387 100644
--- a/test/lisp/erc/erc-stamp-tests.el
+++ b/test/lisp/erc/erc-stamp-tests.el
@@ -279,7 +279,7 @@
279 279
280 (should-not erc-echo-timestamps) 280 (should-not erc-echo-timestamps)
281 (should-not erc-stamp--last-stamp) 281 (should-not erc-stamp--last-stamp)
282 (insert (propertize "abc" 'erc-timestamp 433483200)) 282 (insert (propertize "a" 'erc-ts 433483200 'erc-msg 'msg) "bc")
283 (goto-char (point-min)) 283 (goto-char (point-min))
284 (let ((inhibit-message t) 284 (let ((inhibit-message t)
285 (erc-echo-timestamp-format "%Y-%m-%d %H:%M:%S %Z") 285 (erc-echo-timestamp-format "%Y-%m-%d %H:%M:%S %Z")
diff --git a/test/lisp/erc/erc-tests.el b/test/lisp/erc/erc-tests.el
index ed89fd01d93..39135a8c2df 100644
--- a/test/lisp/erc/erc-tests.el
+++ b/test/lisp/erc/erc-tests.el
@@ -292,6 +292,8 @@
292 (cl-incf counter)))) 292 (cl-incf counter))))
293 erc-accidental-paste-threshold-seconds 293 erc-accidental-paste-threshold-seconds
294 erc-insert-modify-hook 294 erc-insert-modify-hook
295 (erc-modules (remq 'stamp erc-modules))
296 (erc-send-input-line-function #'ignore)
295 (erc--input-review-functions erc--input-review-functions) 297 (erc--input-review-functions erc--input-review-functions)
296 erc-send-completed-hook) 298 erc-send-completed-hook)
297 299
@@ -356,7 +358,8 @@
356 (should (looking-back "#chan@ServNet 11> ")) 358 (should (looking-back "#chan@ServNet 11> "))
357 (should (= (point) erc-input-marker)) 359 (should (= (point) erc-input-marker))
358 (insert "/query bob") 360 (insert "/query bob")
359 (erc-send-current-line) 361 (let (erc-modules)
362 (erc-send-current-line))
360 ;; Last command not inserted 363 ;; Last command not inserted
361 (save-excursion (forward-line -1) 364 (save-excursion (forward-line -1)
362 (should (looking-at "<tester> Howdy"))) 365 (should (looking-at "<tester> Howdy")))
@@ -1431,6 +1434,44 @@
1431 1434
1432 (should-not calls)))))) 1435 (should-not calls))))))
1433 1436
1437(ert-deftest erc--order-text-properties-from-hash ()
1438 (let ((table (map-into '((a . 1)
1439 (erc-ts . 0)
1440 (erc-msg . s005)
1441 (b . 2)
1442 (erc-cmd . 5)
1443 (c . 3))
1444 'hash-table)))
1445 (with-temp-buffer
1446 (erc-mode)
1447 (insert "abc\n")
1448 (add-text-properties 1 2 (erc--order-text-properties-from-hash table))
1449 (should (equal '( erc-msg s005
1450 erc-ts 0
1451 erc-cmd 5
1452 a 1
1453 b 2
1454 c 3)
1455 (text-properties-at (point-min)))))))
1456
1457(ert-deftest erc--check-msg-prop ()
1458 (let ((erc--msg-props (map-into '((a . 1) (b . x)) 'hash-table)))
1459 (should (eq 1 (erc--check-msg-prop 'a)))
1460 (should (erc--check-msg-prop 'a 1))
1461 (should-not (erc--check-msg-prop 'a 2))
1462
1463 (should (eq 'x (erc--check-msg-prop 'b)))
1464 (should (erc--check-msg-prop 'b 'x))
1465 (should-not (erc--check-msg-prop 'b 1))
1466
1467 (should (erc--check-msg-prop 'a '(1 42)))
1468 (should-not (erc--check-msg-prop 'a '(2 42)))
1469
1470 (let ((props '(42 x)))
1471 (should (erc--check-msg-prop 'b props)))
1472 (let ((v '(42 y)))
1473 (should-not (erc--check-msg-prop 'b v)))))
1474
1434(defmacro erc-tests--equal-including-properties (a b) 1475(defmacro erc-tests--equal-including-properties (a b)
1435 (list (if (< emacs-major-version 29) 1476 (list (if (< emacs-major-version 29)
1436 'ert-equal-including-properties 1477 'ert-equal-including-properties
diff --git a/test/lisp/erc/resources/fill/snapshots/merge-01-start.eld b/test/lisp/erc/resources/fill/snapshots/merge-01-start.eld
index 689bacc7012..238d8cc73c2 100644
--- a/test/lisp/erc/resources/fill/snapshots/merge-01-start.eld
+++ b/test/lisp/erc/resources/fill/snapshots/merge-01-start.eld
@@ -1 +1 @@
#("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr 1 2023]\n<bob> zero.[07:00]\n<alice> one.\n<alice> two.\n<bob> three.\n<bob> four.\n<Dummy> five.\n<Dummy> six.\n" 2 20 (erc-timestamp 0 line-prefix (space :width (- 27 (18))) field erc-timestamp) 20 21 (erc-timestamp 0 field erc-timestamp) 21 183 (erc-timestamp 0 wrap-prefix #2=(space :width 27) line-prefix #3=(space :width (- 27 (4)))) 183 190 (erc-timestamp 0 field erc-timestamp wrap-prefix #2# line-prefix #3# display #1=(#7=(margin right-margin) #("[00:00]" 0 7 (display #1# isearch-open-invisible timestamp invisible timestamp font-lock-face erc-timestamp-face)))) 191 192 (erc-timestamp 0 wrap-prefix #2# line-prefix #4=(space :width (- 27 (8))) erc-command PRIVMSG) 192 197 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 197 199 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 199 202 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 202 315 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 315 316 (erc-timestamp 0 erc-command PRIVMSG) 316 348 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 349 350 (erc-timestamp 0 wrap-prefix #2# line-prefix #5=(space :width (- 27 (6))) erc-command PRIVMSG) 350 353 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 353 355 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 355 360 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 360 435 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 436 454 (erc-timestamp 1680332400 line-prefix (space :width (- 27 (18))) field erc-timestamp) 454 455 (erc-timestamp 1680332400 field erc-timestamp) 455 456 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #6=(space :width (- 27 (6))) erc-command PRIVMSG) 456 459 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #6# erc-command PRIVMSG) 459 466 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #6# erc-command PRIVMSG) 466 473 (erc-timestamp 1680332400 field erc-timestamp wrap-prefix #2# line-prefix #6# display #8=(#7# #("[07:00]" 0 7 (display #8# isearch-open-invisible timestamp invisible timestamp font-lock-face erc-timestamp-face)))) 474 475 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #9=(space :width (- 27 (8))) erc-command PRIVMSG) 475 480 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #9# erc-command PRIVMSG) 480 486 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #9# erc-command PRIVMSG) 487 488 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #10=(space :width (- 27 0)) display #11="" erc-command PRIVMSG) 488 493 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #10# display #11# erc-command PRIVMSG) 493 495 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #10# display #11# erc-command PRIVMSG) 495 499 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #10# erc-command PRIVMSG) 500 501 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #12=(space :width (- 27 (6))) erc-command PRIVMSG) 501 504 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #12# erc-command PRIVMSG) 504 512 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #12# erc-command PRIVMSG) 513 514 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #13=(space :width (- 27 0)) display #11# erc-command PRIVMSG) 514 517 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #13# display #11# erc-command PRIVMSG) 517 519 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #13# display #11# erc-command PRIVMSG) 519 524 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #13# erc-command PRIVMSG) 525 526 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #14=(space :width (- 27 (8))) erc-command PRIVMSG) 526 531 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #14# erc-command PRIVMSG) 531 538 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #14# erc-command PRIVMSG) 539 540 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #15=(space :width (- 27 0)) display #11# erc-command PRIVMSG) 540 545 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #15# display #11# erc-command PRIVMSG) 545 547 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #15# display #11# erc-command PRIVMSG) 547 551 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #15# erc-command PRIVMSG)) \ No newline at end of file #("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr 1 2023]\n<bob> zero.[07:00]\n<alice> one.\n<alice> two.\n<bob> three.\n<bob> four.\n<Dummy> five.\n<Dummy> six.\n" 2 3 (erc-msg datestamp erc-ts 0 field erc-timestamp) 3 20 (field erc-timestamp wrap-prefix #1=(space :width 27) line-prefix (space :width (- 27 (18)))) 21 22 (erc-msg unknown erc-ts 0 wrap-prefix #1# line-prefix #2=(space :width (- 27 (4)))) 22 183 (wrap-prefix #1# line-prefix #2#) 183 190 (field erc-timestamp wrap-prefix #1# line-prefix #2# display (#6=(margin right-margin) #("[00:00]" 0 7 (invisible timestamp)))) 191 192 (erc-msg msg erc-ts 0 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #3=(space :width (- 27 (8)))) 192 197 (wrap-prefix #1# line-prefix #3#) 197 199 (wrap-prefix #1# line-prefix #3#) 199 202 (wrap-prefix #1# line-prefix #3#) 202 315 (wrap-prefix #1# line-prefix #3#) 316 348 (wrap-prefix #1# line-prefix #3#) 349 350 (erc-msg msg erc-ts 0 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #4=(space :width (- 27 (6)))) 350 353 (wrap-prefix #1# line-prefix #4#) 353 355 (wrap-prefix #1# line-prefix #4#) 355 360 (wrap-prefix #1# line-prefix #4#) 360 435 (wrap-prefix #1# line-prefix #4#) 436 437 (erc-msg datestamp erc-ts 1680332400 field erc-timestamp) 437 454 (field erc-timestamp wrap-prefix #1# line-prefix (space :width (- 27 (18)))) 455 456 (erc-msg msg erc-ts 1680332400 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #5=(space :width (- 27 (6)))) 456 459 (wrap-prefix #1# line-prefix #5#) 459 466 (wrap-prefix #1# line-prefix #5#) 466 473 (field erc-timestamp wrap-prefix #1# line-prefix #5# display (#6# #("[07:00]" 0 7 (invisible timestamp)))) 474 475 (erc-msg msg erc-ts 1680332400 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #7=(space :width (- 27 (8)))) 475 480 (wrap-prefix #1# line-prefix #7#) 480 486 (wrap-prefix #1# line-prefix #7#) 487 488 (erc-msg msg erc-ts 1680332400 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #8=(space :width (- 27 0)) display #9="") 488 493 (wrap-prefix #1# line-prefix #8# display #9#) 493 495 (wrap-prefix #1# line-prefix #8# display #9#) 495 499 (wrap-prefix #1# line-prefix #8#) 500 501 (erc-msg msg erc-ts 1680332400 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #10=(space :width (- 27 (6)))) 501 504 (wrap-prefix #1# line-prefix #10#) 504 512 (wrap-prefix #1# line-prefix #10#) 513 514 (erc-msg msg erc-ts 1680332400 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #11=(space :width (- 27 0)) display #9#) 514 517 (wrap-prefix #1# line-prefix #11# display #9#) 517 519 (wrap-prefix #1# line-prefix #11# display #9#) 519 524 (wrap-prefix #1# line-prefix #11#) 525 526 (erc-msg msg erc-ts 1680332400 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #12=(space :width (- 27 (8)))) 526 531 (wrap-prefix #1# line-prefix #12#) 531 538 (wrap-prefix #1# line-prefix #12#) 539 540 (erc-msg msg erc-ts 1680332400 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #13=(space :width (- 27 0)) display #9#) 540 545 (wrap-prefix #1# line-prefix #13# display #9#) 545 547 (wrap-prefix #1# line-prefix #13# display #9#) 547 551 (wrap-prefix #1# line-prefix #13#)) \ No newline at end of file
diff --git a/test/lisp/erc/resources/fill/snapshots/merge-02-right.eld b/test/lisp/erc/resources/fill/snapshots/merge-02-right.eld
index 9fa23a7d332..d1ce9198e69 100644
--- a/test/lisp/erc/resources/fill/snapshots/merge-02-right.eld
+++ b/test/lisp/erc/resources/fill/snapshots/merge-02-right.eld
@@ -1 +1 @@
#("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr 1 2023]\n<bob> zero.[07:00]\n<alice> one.\n<alice> two.\n<bob> three.\n<bob> four.\n<Dummy> five.\n<Dummy> six.\n" 2 20 (erc-timestamp 0 line-prefix (space :width (- 29 (18))) field erc-timestamp) 20 21 (erc-timestamp 0 field erc-timestamp) 21 183 (erc-timestamp 0 wrap-prefix #2=(space :width 29) line-prefix #3=(space :width (- 29 (4)))) 183 190 (erc-timestamp 0 field erc-timestamp wrap-prefix #2# line-prefix #3# display #1=(#7=(margin right-margin) #("[00:00]" 0 7 (display #1# isearch-open-invisible timestamp invisible timestamp font-lock-face erc-timestamp-face)))) 191 192 (erc-timestamp 0 wrap-prefix #2# line-prefix #4=(space :width (- 29 (8))) erc-command PRIVMSG) 192 197 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 197 199 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 199 202 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 202 315 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 315 316 (erc-timestamp 0 erc-command PRIVMSG) 316 348 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 349 350 (erc-timestamp 0 wrap-prefix #2# line-prefix #5=(space :width (- 29 (6))) erc-command PRIVMSG) 350 353 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 353 355 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 355 360 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 360 435 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 436 454 (erc-timestamp 1680332400 line-prefix (space :width (- 29 (18))) field erc-timestamp) 454 455 (erc-timestamp 1680332400 field erc-timestamp) 455 456 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #6=(space :width (- 29 (6))) erc-command PRIVMSG) 456 459 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #6# erc-command PRIVMSG) 459 466 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #6# erc-command PRIVMSG) 466 473 (erc-timestamp 1680332400 field erc-timestamp wrap-prefix #2# line-prefix #6# display #8=(#7# #("[07:00]" 0 7 (display #8# isearch-open-invisible timestamp invisible timestamp font-lock-face erc-timestamp-face)))) 474 475 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #9=(space :width (- 29 (8))) erc-command PRIVMSG) 475 480 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #9# erc-command PRIVMSG) 480 486 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #9# erc-command PRIVMSG) 487 488 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #10=(space :width (- 29 0)) display #11="" erc-command PRIVMSG) 488 493 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #10# display #11# erc-command PRIVMSG) 493 495 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #10# display #11# erc-command PRIVMSG) 495 499 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #10# erc-command PRIVMSG) 500 501 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #12=(space :width (- 29 (6))) erc-command PRIVMSG) 501 504 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #12# erc-command PRIVMSG) 504 512 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #12# erc-command PRIVMSG) 513 514 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #13=(space :width (- 29 0)) display #11# erc-command PRIVMSG) 514 517 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #13# display #11# erc-command PRIVMSG) 517 519 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #13# display #11# erc-command PRIVMSG) 519 524 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #13# erc-command PRIVMSG) 525 526 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #14=(space :width (- 29 (8))) erc-command PRIVMSG) 526 531 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #14# erc-command PRIVMSG) 531 538 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #14# erc-command PRIVMSG) 539 540 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #15=(space :width (- 29 0)) display #11# erc-command PRIVMSG) 540 545 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #15# display #11# erc-command PRIVMSG) 545 547 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #15# display #11# erc-command PRIVMSG) 547 551 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #15# erc-command PRIVMSG)) \ No newline at end of file #("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr 1 2023]\n<bob> zero.[07:00]\n<alice> one.\n<alice> two.\n<bob> three.\n<bob> four.\n<Dummy> five.\n<Dummy> six.\n" 2 3 (erc-msg datestamp erc-ts 0 field erc-timestamp) 3 20 (field erc-timestamp wrap-prefix #1=(space :width 29) line-prefix (space :width (- 29 (18)))) 21 22 (erc-msg unknown erc-ts 0 wrap-prefix #1# line-prefix #2=(space :width (- 29 (4)))) 22 183 (wrap-prefix #1# line-prefix #2#) 183 190 (field erc-timestamp wrap-prefix #1# line-prefix #2# display (#6=(margin right-margin) #("[00:00]" 0 7 (invisible timestamp)))) 191 192 (erc-msg msg erc-ts 0 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #3=(space :width (- 29 (8)))) 192 197 (wrap-prefix #1# line-prefix #3#) 197 199 (wrap-prefix #1# line-prefix #3#) 199 202 (wrap-prefix #1# line-prefix #3#) 202 315 (wrap-prefix #1# line-prefix #3#) 316 348 (wrap-prefix #1# line-prefix #3#) 349 350 (erc-msg msg erc-ts 0 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #4=(space :width (- 29 (6)))) 350 353 (wrap-prefix #1# line-prefix #4#) 353 355 (wrap-prefix #1# line-prefix #4#) 355 360 (wrap-prefix #1# line-prefix #4#) 360 435 (wrap-prefix #1# line-prefix #4#) 436 437 (erc-msg datestamp erc-ts 1680332400 field erc-timestamp) 437 454 (field erc-timestamp wrap-prefix #1# line-prefix (space :width (- 29 (18)))) 455 456 (erc-msg msg erc-ts 1680332400 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #5=(space :width (- 29 (6)))) 456 459 (wrap-prefix #1# line-prefix #5#) 459 466 (wrap-prefix #1# line-prefix #5#) 466 473 (field erc-timestamp wrap-prefix #1# line-prefix #5# display (#6# #("[07:00]" 0 7 (invisible timestamp)))) 474 475 (erc-msg msg erc-ts 1680332400 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #7=(space :width (- 29 (8)))) 475 480 (wrap-prefix #1# line-prefix #7#) 480 486 (wrap-prefix #1# line-prefix #7#) 487 488 (erc-msg msg erc-ts 1680332400 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #8=(space :width (- 29 0)) display #9="") 488 493 (wrap-prefix #1# line-prefix #8# display #9#) 493 495 (wrap-prefix #1# line-prefix #8# display #9#) 495 499 (wrap-prefix #1# line-prefix #8#) 500 501 (erc-msg msg erc-ts 1680332400 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #10=(space :width (- 29 (6)))) 501 504 (wrap-prefix #1# line-prefix #10#) 504 512 (wrap-prefix #1# line-prefix #10#) 513 514 (erc-msg msg erc-ts 1680332400 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #11=(space :width (- 29 0)) display #9#) 514 517 (wrap-prefix #1# line-prefix #11# display #9#) 517 519 (wrap-prefix #1# line-prefix #11# display #9#) 519 524 (wrap-prefix #1# line-prefix #11#) 525 526 (erc-msg msg erc-ts 1680332400 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #12=(space :width (- 29 (8)))) 526 531 (wrap-prefix #1# line-prefix #12#) 531 538 (wrap-prefix #1# line-prefix #12#) 539 540 (erc-msg msg erc-ts 1680332400 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #13=(space :width (- 29 0)) display #9#) 540 545 (wrap-prefix #1# line-prefix #13# display #9#) 545 547 (wrap-prefix #1# line-prefix #13# display #9#) 547 551 (wrap-prefix #1# line-prefix #13#)) \ No newline at end of file
diff --git a/test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld b/test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld
index a3d533c87b5..d70184724ba 100644
--- a/test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld
+++ b/test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld
@@ -1 +1 @@
#("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr 1 2023]\n<bob> zero.[07:00]\n* bob one\n<bob> two.\n* bob three\n<bob> four.\n" 2 20 (erc-timestamp 0 line-prefix (space :width (- 27 (18))) field erc-timestamp) 20 21 (erc-timestamp 0 field erc-timestamp) 21 183 (erc-timestamp 0 wrap-prefix #2=(space :width 27) line-prefix #3=(space :width (- 27 (4)))) 183 190 (erc-timestamp 0 field erc-timestamp wrap-prefix #2# line-prefix #3# display #1=(#7=(margin right-margin) #("[00:00]" 0 7 (display #1# invisible timestamp font-lock-face erc-timestamp-face)))) 191 192 (erc-timestamp 0 wrap-prefix #2# line-prefix #4=(space :width (- 27 (8))) erc-command PRIVMSG) 192 197 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 197 199 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 199 202 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 202 315 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 315 316 (erc-timestamp 0 erc-command PRIVMSG) 316 348 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 349 350 (erc-timestamp 0 wrap-prefix #2# line-prefix #5=(space :width (- 27 (6))) erc-command PRIVMSG) 350 353 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 353 355 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 355 360 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 360 435 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 436 454 (erc-timestamp 1680332400 line-prefix (space :width (- 27 (18))) field erc-timestamp) 454 455 (erc-timestamp 1680332400 field erc-timestamp) 455 456 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #6=(space :width (- 27 (6))) erc-command PRIVMSG) 456 459 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #6# erc-command PRIVMSG) 459 466 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #6# erc-command PRIVMSG) 466 473 (erc-timestamp 1680332400 field erc-timestamp wrap-prefix #2# line-prefix #6# display #8=(#7# #("[07:00]" 0 7 (display #8# invisible timestamp font-lock-face erc-timestamp-face)))) 474 476 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #9=(space :width (- 27 (6))) erc-ctcp ACTION erc-command PRIVMSG) 476 479 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #9# erc-ctcp ACTION erc-command PRIVMSG) 479 483 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #9# erc-ctcp ACTION erc-command PRIVMSG) 484 485 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #10=(space :width (- 27 (6))) erc-command PRIVMSG) 485 488 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #10# erc-command PRIVMSG) 488 494 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #10# erc-command PRIVMSG) 495 497 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #11=(space :width (- 27 (2))) erc-ctcp ACTION erc-command PRIVMSG) 497 500 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #11# erc-ctcp ACTION erc-command PRIVMSG) 500 506 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #11# erc-ctcp ACTION erc-command PRIVMSG) 507 508 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #12=(space :width (- 27 (6))) erc-command PRIVMSG) 508 511 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #12# erc-command PRIVMSG) 511 518 (erc-timestamp 1680332400 wrap-prefix #2# line-prefix #12# erc-command PRIVMSG)) \ No newline at end of file #("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr 1 2023]\n<bob> zero.[07:00]\n* bob one\n<bob> two.\n* bob three\n<bob> four.\n" 2 3 (erc-msg datestamp erc-ts 0 field erc-timestamp) 3 20 (field erc-timestamp wrap-prefix #1=(space :width 27) line-prefix (space :width (- 27 (18)))) 21 22 (erc-msg unknown erc-ts 0 wrap-prefix #1# line-prefix #2=(space :width (- 27 (4)))) 22 183 (wrap-prefix #1# line-prefix #2#) 183 190 (field erc-timestamp wrap-prefix #1# line-prefix #2# display (#6=(margin right-margin) #("[00:00]" 0 7 (invisible timestamp)))) 191 192 (erc-msg msg erc-ts 0 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #3=(space :width (- 27 (8)))) 192 197 (wrap-prefix #1# line-prefix #3#) 197 199 (wrap-prefix #1# line-prefix #3#) 199 202 (wrap-prefix #1# line-prefix #3#) 202 315 (wrap-prefix #1# line-prefix #3#) 316 348 (wrap-prefix #1# line-prefix #3#) 349 350 (erc-msg msg erc-ts 0 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #4=(space :width (- 27 (6)))) 350 353 (wrap-prefix #1# line-prefix #4#) 353 355 (wrap-prefix #1# line-prefix #4#) 355 360 (wrap-prefix #1# line-prefix #4#) 360 435 (wrap-prefix #1# line-prefix #4#) 436 437 (erc-msg datestamp erc-ts 1680332400 field erc-timestamp) 437 454 (field erc-timestamp wrap-prefix #1# line-prefix (space :width (- 27 (18)))) 455 456 (erc-msg msg erc-ts 1680332400 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #5=(space :width (- 27 (6)))) 456 459 (wrap-prefix #1# line-prefix #5#) 459 466 (wrap-prefix #1# line-prefix #5#) 466 473 (field erc-timestamp wrap-prefix #1# line-prefix #5# display (#6# #("[07:00]" 0 7 (invisible timestamp)))) 474 475 (erc-msg msg erc-ts 1680332400 erc-cmd PRIVMSG erc-ctcp ACTION wrap-prefix #1# line-prefix #7=(space :width (- 27 (6)))) 475 476 (wrap-prefix #1# line-prefix #7#) 476 479 (wrap-prefix #1# line-prefix #7#) 479 483 (wrap-prefix #1# line-prefix #7#) 484 485 (erc-msg msg erc-ts 1680332400 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #8=(space :width (- 27 0)) display #9="") 485 488 (wrap-prefix #1# line-prefix #8# display #9#) 488 490 (wrap-prefix #1# line-prefix #8# display #9#) 490 494 (wrap-prefix #1# line-prefix #8#) 495 496 (erc-msg msg erc-ts 1680332400 erc-cmd PRIVMSG erc-ctcp ACTION wrap-prefix #1# line-prefix #10=(space :width (- 27 (2)))) 496 497 (wrap-prefix #1# line-prefix #10#) 497 500 (wrap-prefix #1# line-prefix #10#) 500 506 (wrap-prefix #1# line-prefix #10#) 507 508 (erc-msg msg erc-ts 1680332400 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #11=(space :width (- 27 0)) display #9#) 508 511 (wrap-prefix #1# line-prefix #11# display #9#) 511 513 (wrap-prefix #1# line-prefix #11# display #9#) 513 518 (wrap-prefix #1# line-prefix #11#)) \ No newline at end of file
diff --git a/test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld b/test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld
index 80c9e1d80f5..def97738ce6 100644
--- a/test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld
+++ b/test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld
@@ -1 +1 @@
#("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 20 (erc-timestamp 0 line-prefix (space :width (- 27 (18))) field erc-timestamp) 20 21 (erc-timestamp 0 field erc-timestamp) 21 183 (erc-timestamp 0 wrap-prefix #2=(space :width 27) line-prefix #3=(space :width (- 27 (4)))) 183 190 (erc-timestamp 0 field erc-timestamp wrap-prefix #2# line-prefix #3# display #1=((margin right-margin) #("[00:00]" 0 7 (display #1# isearch-open-invisible timestamp invisible timestamp font-lock-face erc-timestamp-face)))) 191 192 (erc-timestamp 0 wrap-prefix #2# line-prefix #4=(space :width (- 27 (8))) erc-command PRIVMSG) 192 197 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 197 199 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 199 202 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 202 315 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 315 316 (erc-timestamp 0 erc-command PRIVMSG) 316 348 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 349 350 (erc-timestamp 0 wrap-prefix #2# line-prefix #5=(space :width (- 27 (6))) erc-command PRIVMSG) 350 353 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 353 355 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 355 360 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 360 435 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG)) \ No newline at end of file #("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc-msg datestamp erc-ts 0 field erc-timestamp) 3 20 (field erc-timestamp wrap-prefix #1=(space :width 27) line-prefix (space :width (- 27 (18)))) 21 22 (erc-msg unknown erc-ts 0 wrap-prefix #1# line-prefix #2=(space :width (- 27 (4)))) 22 183 (wrap-prefix #1# line-prefix #2#) 183 190 (field erc-timestamp wrap-prefix #1# line-prefix #2# display ((margin right-margin) #("[00:00]" 0 7 (invisible timestamp)))) 191 192 (erc-msg msg erc-ts 0 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #3=(space :width (- 27 (8)))) 192 197 (wrap-prefix #1# line-prefix #3#) 197 199 (wrap-prefix #1# line-prefix #3#) 199 202 (wrap-prefix #1# line-prefix #3#) 202 315 (wrap-prefix #1# line-prefix #3#) 316 348 (wrap-prefix #1# line-prefix #3#) 349 350 (erc-msg msg erc-ts 0 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #4=(space :width (- 27 (6)))) 350 353 (wrap-prefix #1# line-prefix #4#) 353 355 (wrap-prefix #1# line-prefix #4#) 355 360 (wrap-prefix #1# line-prefix #4#) 360 435 (wrap-prefix #1# line-prefix #4#)) \ No newline at end of file
diff --git a/test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld b/test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld
index e675695f660..be3e2b33cfd 100644
--- a/test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld
+++ b/test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld
@@ -1 +1 @@
#("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 20 (erc-timestamp 0 line-prefix (space :width (- 29 (18))) field erc-timestamp) 20 21 (erc-timestamp 0 field erc-timestamp) 21 183 (erc-timestamp 0 wrap-prefix #2=(space :width 29) line-prefix #3=(space :width (- 29 (4)))) 183 190 (erc-timestamp 0 field erc-timestamp wrap-prefix #2# line-prefix #3# display #1=((margin right-margin) #("[00:00]" 0 7 (display #1# isearch-open-invisible timestamp invisible timestamp font-lock-face erc-timestamp-face)))) 191 192 (erc-timestamp 0 wrap-prefix #2# line-prefix #4=(space :width (- 29 (8))) erc-command PRIVMSG) 192 197 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 197 199 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 199 202 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 202 315 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 315 316 (erc-timestamp 0 erc-command PRIVMSG) 316 348 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 349 350 (erc-timestamp 0 wrap-prefix #2# line-prefix #5=(space :width (- 29 (6))) erc-command PRIVMSG) 350 353 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 353 355 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 355 360 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 360 435 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG)) \ No newline at end of file #("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc-msg datestamp erc-ts 0 field erc-timestamp) 3 20 (field erc-timestamp wrap-prefix #1=(space :width 29) line-prefix (space :width (- 29 (18)))) 21 22 (erc-msg unknown erc-ts 0 wrap-prefix #1# line-prefix #2=(space :width (- 29 (4)))) 22 183 (wrap-prefix #1# line-prefix #2#) 183 190 (field erc-timestamp wrap-prefix #1# line-prefix #2# display ((margin right-margin) #("[00:00]" 0 7 (invisible timestamp)))) 191 192 (erc-msg msg erc-ts 0 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #3=(space :width (- 29 (8)))) 192 197 (wrap-prefix #1# line-prefix #3#) 197 199 (wrap-prefix #1# line-prefix #3#) 199 202 (wrap-prefix #1# line-prefix #3#) 202 315 (wrap-prefix #1# line-prefix #3#) 316 348 (wrap-prefix #1# line-prefix #3#) 349 350 (erc-msg msg erc-ts 0 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #4=(space :width (- 29 (6)))) 350 353 (wrap-prefix #1# line-prefix #4#) 353 355 (wrap-prefix #1# line-prefix #4#) 355 360 (wrap-prefix #1# line-prefix #4#) 360 435 (wrap-prefix #1# line-prefix #4#)) \ No newline at end of file
diff --git a/test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld b/test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld
index a6070c2e3ff..098257d0b49 100644
--- a/test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld
+++ b/test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld
@@ -1 +1 @@
#("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 20 (erc-timestamp 0 line-prefix (space :width (- 25 (18))) field erc-timestamp) 20 21 (erc-timestamp 0 field erc-timestamp) 21 183 (erc-timestamp 0 wrap-prefix #2=(space :width 25) line-prefix #3=(space :width (- 25 (4)))) 183 190 (erc-timestamp 0 field erc-timestamp wrap-prefix #2# line-prefix #3# display #1=((margin right-margin) #("[00:00]" 0 7 (display #1# isearch-open-invisible timestamp invisible timestamp font-lock-face erc-timestamp-face)))) 191 192 (erc-timestamp 0 wrap-prefix #2# line-prefix #4=(space :width (- 25 (8))) erc-command PRIVMSG) 192 197 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 197 199 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 199 202 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 202 315 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 315 316 (erc-timestamp 0 erc-command PRIVMSG) 316 348 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 349 350 (erc-timestamp 0 wrap-prefix #2# line-prefix #5=(space :width (- 25 (6))) erc-command PRIVMSG) 350 353 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 353 355 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 355 360 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 360 435 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG)) \ No newline at end of file #("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc-msg datestamp erc-ts 0 field erc-timestamp) 3 20 (field erc-timestamp wrap-prefix #1=(space :width 25) line-prefix (space :width (- 25 (18)))) 21 22 (erc-msg unknown erc-ts 0 wrap-prefix #1# line-prefix #2=(space :width (- 25 (4)))) 22 183 (wrap-prefix #1# line-prefix #2#) 183 190 (field erc-timestamp wrap-prefix #1# line-prefix #2# display ((margin right-margin) #("[00:00]" 0 7 (invisible timestamp)))) 191 192 (erc-msg msg erc-ts 0 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #3=(space :width (- 25 (8)))) 192 197 (wrap-prefix #1# line-prefix #3#) 197 199 (wrap-prefix #1# line-prefix #3#) 199 202 (wrap-prefix #1# line-prefix #3#) 202 315 (wrap-prefix #1# line-prefix #3#) 316 348 (wrap-prefix #1# line-prefix #3#) 349 350 (erc-msg msg erc-ts 0 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #4=(space :width (- 25 (6)))) 350 353 (wrap-prefix #1# line-prefix #4#) 353 355 (wrap-prefix #1# line-prefix #4#) 355 360 (wrap-prefix #1# line-prefix #4#) 360 435 (wrap-prefix #1# line-prefix #4#)) \ No newline at end of file
diff --git a/test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld b/test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld
index 80c9e1d80f5..def97738ce6 100644
--- a/test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld
+++ b/test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld
@@ -1 +1 @@
#("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 20 (erc-timestamp 0 line-prefix (space :width (- 27 (18))) field erc-timestamp) 20 21 (erc-timestamp 0 field erc-timestamp) 21 183 (erc-timestamp 0 wrap-prefix #2=(space :width 27) line-prefix #3=(space :width (- 27 (4)))) 183 190 (erc-timestamp 0 field erc-timestamp wrap-prefix #2# line-prefix #3# display #1=((margin right-margin) #("[00:00]" 0 7 (display #1# isearch-open-invisible timestamp invisible timestamp font-lock-face erc-timestamp-face)))) 191 192 (erc-timestamp 0 wrap-prefix #2# line-prefix #4=(space :width (- 27 (8))) erc-command PRIVMSG) 192 197 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 197 199 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 199 202 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 202 315 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 315 316 (erc-timestamp 0 erc-command PRIVMSG) 316 348 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 349 350 (erc-timestamp 0 wrap-prefix #2# line-prefix #5=(space :width (- 27 (6))) erc-command PRIVMSG) 350 353 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 353 355 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 355 360 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 360 435 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG)) \ No newline at end of file #("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc-msg datestamp erc-ts 0 field erc-timestamp) 3 20 (field erc-timestamp wrap-prefix #1=(space :width 27) line-prefix (space :width (- 27 (18)))) 21 22 (erc-msg unknown erc-ts 0 wrap-prefix #1# line-prefix #2=(space :width (- 27 (4)))) 22 183 (wrap-prefix #1# line-prefix #2#) 183 190 (field erc-timestamp wrap-prefix #1# line-prefix #2# display ((margin right-margin) #("[00:00]" 0 7 (invisible timestamp)))) 191 192 (erc-msg msg erc-ts 0 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #3=(space :width (- 27 (8)))) 192 197 (wrap-prefix #1# line-prefix #3#) 197 199 (wrap-prefix #1# line-prefix #3#) 199 202 (wrap-prefix #1# line-prefix #3#) 202 315 (wrap-prefix #1# line-prefix #3#) 316 348 (wrap-prefix #1# line-prefix #3#) 349 350 (erc-msg msg erc-ts 0 erc-cmd PRIVMSG wrap-prefix #1# line-prefix #4=(space :width (- 27 (6)))) 350 353 (wrap-prefix #1# line-prefix #4#) 353 355 (wrap-prefix #1# line-prefix #4#) 355 360 (wrap-prefix #1# line-prefix #4#) 360 435 (wrap-prefix #1# line-prefix #4#)) \ No newline at end of file
diff --git a/test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld b/test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld
index 2b8766c27f4..360b3dafafd 100644
--- a/test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld
+++ b/test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld
@@ -1 +1 @@
#("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n<bob> This buffer is for text.\n*** one two three\n*** four five six\n<bob> Somebody stop me\n" 2 20 (erc-timestamp 0 line-prefix (space :width (- 27 (18))) field erc-timestamp) 20 21 (erc-timestamp 0 field erc-timestamp) 21 183 (erc-timestamp 0 wrap-prefix #2=(space :width 27) line-prefix #3=(space :width (- 27 (4)))) 183 190 (erc-timestamp 0 field erc-timestamp wrap-prefix #2# line-prefix #3# display #1=((margin right-margin) #("[00:00]" 0 7 (display #1# isearch-open-invisible timestamp invisible timestamp font-lock-face erc-timestamp-face)))) 190 191 (line-spacing 0.5) 191 192 (erc-timestamp 0 wrap-prefix #2# line-prefix #4=(space :width (- 27 (8))) erc-command PRIVMSG) 192 197 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 197 199 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 199 202 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 202 315 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 315 316 (erc-timestamp 0 erc-command PRIVMSG) 316 348 (erc-timestamp 0 wrap-prefix #2# line-prefix #4# erc-command PRIVMSG) 348 349 (line-spacing 0.5) 349 350 (erc-timestamp 0 wrap-prefix #2# line-prefix #5=(space :width (- 27 (6))) erc-command PRIVMSG) 350 353 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 353 355 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 355 360 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 360 435 (erc-timestamp 0 wrap-prefix #2# line-prefix #5# erc-command PRIVMSG) 435 436 (line-spacing 0.5) 436 437 (erc-timestamp 0 wrap-prefix #2# line-prefix #6=(space :width (- 27 0)) display #7="" erc-command PRIVMSG) 437 440 (erc-timestamp 0 wrap-prefix #2# line-prefix #6# display #7# erc-command PRIVMSG) 440 442 (erc-timestamp 0 wrap-prefix #2# line-prefix #6# display #7# erc-command PRIVMSG) 442 466 (erc-timestamp 0 wrap-prefix #2# line-prefix #6# erc-command PRIVMSG) 466 467 (line-spacing 0.5) 467 484 (erc-timestamp 0 wrap-prefix #2# line-prefix (space :width (- 27 (4)))) 485 502 (erc-timestamp 0 wrap-prefix #2# line-prefix (space :width (- 27 (4)))) 502 503 (line-spacing 0.5) 503 504 (erc-timestamp 0 wrap-prefix #2# line-prefix #8=(space :width (- 27 (6))) erc-command PRIVMSG) 504 507 (erc-timestamp 0 wrap-prefix #2# line-prefix #8# erc-command PRIVMSG) 507 525 (erc-timestamp 0 wrap-prefix #2# line-prefix #8# erc-command PRIVMSG)) \ No newline at end of file #("\n\n\n[Thu Jan 1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n<bob> This buffer is for text.\n*** one two three\n*** four five six\n<bob> Somebody stop me\n" 2 3 (erc-msg datestamp erc-ts 0 field erc-timestamp) 3 20 (field erc-timestamp wrap-prefix #1=(space :width 27) line-prefix (space :width (- 27 (18)))) 21 22 (erc-msg unknown erc-ts 0 wrap-prefix #1# line-prefix #2=(space :width (- 27 (4)))) 22 183 (wrap-prefix #1# line-prefix #2#) 183 190 (field erc-timestamp wrap-prefix #1# line-prefix #2# display ((margin right-margin) #("[00:00]" 0 7 (invisible timestamp)))) 190 191 (line-spacing 0.5) 191 192 (erc-msg msg erc-cmd PRIVMSG erc-ts 0 wrap-prefix #1# line-prefix #3=(space :width (- 27 (8)))) 192 197 (wrap-prefix #1# line-prefix #3#) 197 199 (wrap-prefix #1# line-prefix #3#) 199 202 (wrap-prefix #1# line-prefix #3#) 202 315 (wrap-prefix #1# line-prefix #3#) 316 348 (wrap-prefix #1# line-prefix #3#) 348 349 (line-spacing 0.5) 349 350 (erc-msg msg erc-cmd PRIVMSG erc-ts 0 wrap-prefix #1# line-prefix #4=(space :width (- 27 (6)))) 350 353 (wrap-prefix #1# line-prefix #4#) 353 355 (wrap-prefix #1# line-prefix #4#) 355 360 (wrap-prefix #1# line-prefix #4#) 360 435 (wrap-prefix #1# line-prefix #4#) 435 436 (line-spacing 0.5) 436 437 (erc-msg msg erc-cmd PRIVMSG erc-ts 0 wrap-prefix #1# line-prefix #5=(space :width (- 27 0)) display #6="") 437 440 (wrap-prefix #1# line-prefix #5# display #6#) 440 442 (wrap-prefix #1# line-prefix #5# display #6#) 442 466 (wrap-prefix #1# line-prefix #5#) 466 467 (line-spacing 0.5) 467 468 (erc-msg unknown erc-ts 0 wrap-prefix #1# line-prefix #7=(space :width (- 27 (4)))) 468 484 (wrap-prefix #1# line-prefix #7#) 485 486 (erc-msg unknown erc-ts 0 wrap-prefix #1# line-prefix #8=(space :width (- 27 (4)))) 486 502 (wrap-prefix #1# line-prefix #8#) 502 503 (line-spacing 0.5) 503 504 (erc-msg msg erc-cmd PRIVMSG erc-ts 0 wrap-prefix #1# line-prefix #9=(space :width (- 27 (6)))) 504 507 (wrap-prefix #1# line-prefix #9#) 507 525 (wrap-prefix #1# line-prefix #9#))
diff --git a/test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld b/test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld
index f62b65cd170..cd3537d3c94 100644
--- a/test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld
+++ b/test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld
@@ -1 +1 @@
#("\n\n[00:00]*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.\n[00:00]<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n[00:00]<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 9 (erc-timestamp 0 display (#4=(margin left-margin) #("[00:00]" 0 7 (invisible timestamp font-lock-face erc-timestamp-face))) field erc-timestamp wrap-prefix #1=(space :width 27) line-prefix #2=(space :width (- 27 (4)))) 9 171 (erc-timestamp 0 wrap-prefix #1# line-prefix #2#) 172 179 (erc-timestamp 0 display (#4# #("[00:00]" 0 7 (invisible timestamp font-lock-face erc-timestamp-face))) field erc-timestamp wrap-prefix #1# line-prefix #3=(space :width (- 27 (8)))) 179 180 (erc-timestamp 0 wrap-prefix #1# line-prefix #3# erc-command PRIVMSG) 180 185 (erc-timestamp 0 wrap-prefix #1# line-prefix #3# erc-command PRIVMSG) 185 187 (erc-timestamp 0 wrap-prefix #1# line-prefix #3# erc-command PRIVMSG) 187 190 (erc-timestamp 0 wrap-prefix #1# line-prefix #3# erc-command PRIVMSG) 190 303 (erc-timestamp 0 wrap-prefix #1# line-prefix #3# erc-command PRIVMSG) 303 304 (erc-timestamp 0 erc-command PRIVMSG) 304 336 (erc-timestamp 0 wrap-prefix #1# line-prefix #3# erc-command PRIVMSG) 337 344 (erc-timestamp 0 display (#4# #("[00:00]" 0 7 (invisible timestamp font-lock-face erc-timestamp-face))) field erc-timestamp wrap-prefix #1# line-prefix #5=(space :width (- 27 (6)))) 344 345 (erc-timestamp 0 wrap-prefix #1# line-prefix #5# erc-command PRIVMSG) 345 348 (erc-timestamp 0 wrap-prefix #1# line-prefix #5# erc-command PRIVMSG) 348 350 (erc-timestamp 0 wrap-prefix #1# line-prefix #5# erc-command PRIVMSG) 350 355 (erc-timestamp 0 wrap-prefix #1# line-prefix #5# erc-command PRIVMSG) 355 430 (erc-timestamp 0 wrap-prefix #1# line-prefix #5# erc-command PRIVMSG)) \ No newline at end of file #("\n\n[00:00]*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.\n[00:00]<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n[00:00]<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc-msg unknown erc-ts 0 display #3=(#5=(margin left-margin) #("[00:00]" 0 7 (invisible timestamp font-lock-face erc-timestamp-face))) field erc-timestamp wrap-prefix #1=(space :width 27) line-prefix #2=(space :width (- 27 (4)))) 3 9 (display #3# field erc-timestamp wrap-prefix #1# line-prefix #2#) 9 171 (wrap-prefix #1# line-prefix #2#) 172 173 (erc-msg msg erc-ts 0 erc-cmd PRIVMSG display #6=(#5# #("[00:00]" 0 7 (invisible timestamp font-lock-face erc-timestamp-face))) field erc-timestamp wrap-prefix #1# line-prefix #4=(space :width (- 27 (8)))) 173 179 (display #6# field erc-timestamp wrap-prefix #1# line-prefix #4#) 179 180 (wrap-prefix #1# line-prefix #4#) 180 185 (wrap-prefix #1# line-prefix #4#) 185 187 (wrap-prefix #1# line-prefix #4#) 187 190 (wrap-prefix #1# line-prefix #4#) 190 303 (wrap-prefix #1# line-prefix #4#) 304 336 (wrap-prefix #1# line-prefix #4#) 337 338 (erc-msg msg erc-ts 0 erc-cmd PRIVMSG display #8=(#5# #("[00:00]" 0 7 (invisible timestamp font-lock-face erc-timestamp-face))) field erc-timestamp wrap-prefix #1# line-prefix #7=(space :width (- 27 (6)))) 338 344 (display #8# field erc-timestamp wrap-prefix #1# line-prefix #7#) 344 345 (wrap-prefix #1# line-prefix #7#) 345 348 (wrap-prefix #1# line-prefix #7#) 348 350 (wrap-prefix #1# line-prefix #7#) 350 355 (wrap-prefix #1# line-prefix #7#) 355 430 (wrap-prefix #1# line-prefix #7#)) \ No newline at end of file
diff --git a/test/lisp/erc/resources/match/fools/fill-wrap.eld b/test/lisp/erc/resources/match/fools/fill-wrap.eld
new file mode 100644
index 00000000000..dff75ef9cd2
--- /dev/null
+++ b/test/lisp/erc/resources/match/fools/fill-wrap.eld
@@ -0,0 +1,41 @@
1;; -*- mode: lisp-data; -*-
2((pass 10 "PASS :changeme"))
3((nick 1 "NICK tester"))
4((user 1 "USER user 0 * :tester")
5 (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester")
6 (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16")
7 (0 ":irc.foonet.org 003 tester :This server was created Tue, 04 May 2021 05:06:18 UTC")
8 (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv")
9 (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server")
10 (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=FooNet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server")
11 (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server")
12 (0 ":irc.foonet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)")
13 (0 ":irc.foonet.org 252 tester 0 :IRC Operators online")
14 (0 ":irc.foonet.org 253 tester 0 :unregistered connections")
15 (0 ":irc.foonet.org 254 tester 1 :channels formed")
16 (0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers")
17 (0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3")
18 (0 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3")
19 (0 ":irc.foonet.org 422 tester :MOTD File is missing"))
20
21((mode-user 10 "MODE tester +i")
22 (0 ":irc.foonet.org 221 tester +i")
23 (0 ":irc.foonet.org NOTICE tester :This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect."))
24
25((join 6 "JOIN #chan")
26 (0 ":tester!~u@9g6b728983yd2.irc JOIN #chan")
27 (0 ":irc.foonet.org 353 tester = #chan :alice tester @bob")
28 (0 ":irc.foonet.org 366 tester #chan :End of NAMES list"))
29
30((mode 5 "MODE #chan")
31 (0 ":irc.foonet.org 324 tester #chan +nt")
32 (0 ":irc.foonet.org 329 tester #chan 1620104779")
33 (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :tester, welcome!")
34 (0 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :None better than to let him fetch off his drum, which you hear him so confidently undertake to do.")
35 (0 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: Still we went coupled and inseparable.")
36 (0 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: Give me your hand. This hand is moist, my lady."))
37
38((privmsg 5 "PRIVMSG #chan :hey")
39 (0 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :You have paid the heavens your function, and the prisoner the very debt of your calling. I have laboured for the poor gentleman to the extremest shore of my modesty; but my brother justice have I found so severe, that he hath forced me to tell him he is indeed Justice.")
40 (0 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: In the sick air: let not thy sword skip one.")
41 (0 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :The web of our life is of a mingled yarn, good and ill together: our virtues would be proud if our faults whipped them not; and our crimes would despair if they were not cherished by our virtues."))