GNU bug report logs -
#60936
30.0.50; ERC >5.5: Add erc-fill style based on visual-line-mode
Previous Next
Reported by: "J.P." <jp <at> neverwas.me>
Date: Wed, 18 Jan 2023 14:55:02 UTC
Severity: normal
Tags: patch
Found in version 30.0.50
Fixed in version 30.1
Done: "J.P." <jp <at> neverwas.me>
Bug is archived. No further changes may be made.
Full log
Message #120 received at 60936 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
A couple more bugs stemming from this feature's introduction have
surfaced. The first involves stamp hiding when `erc-fill-wrap-mode' is
enabled. To reproduce from emacs -Q:
- Connect and join a channel
- In the channel buffer, set `erc-timestamp-last-inserted-left' to nil
- Say something and notice a new date stamp inserted
- Run M-x erc-toggle-timestamps RET
- Notice that the message after the stamp is dedented incorrectly
This problem occurs because date stamps are not well defined and
straddle roles occupied by normal stamps and standalone messages. The
remedy I've chosen retains compatibility at the cost of kicking the can
down the road WRT defining the precise role and expected behavior of
date stamps. (If still unclear, I say "date stamp" to mean a left-sided
stamp inserted by the function `erc-insert-timestamp-left-and-right' and
formatted using the string `erc-timestamp-format-left'.) This issue is
closely related to the interplay between normal right-hand stamps and
non-`fill-wrap' fill functions because the latter hard-wrap (i.e.,
"fill") messages, which results in a stamp often residing on its own
line.
The second issue comes down to the lack of an integration with
`text-scale-mode'. To reproduce from emacs -Q:
- Connect from a graphical Emacs
- In the server buffer, hit C-x C-=, and notice misaligned speaker tags
among the upscaled text
- Run a command, like "/msg NickServ help", and notice the leading
`erc-notice-prefix' portion of new messages correctly dedented
- Hit C-x C-0 and observe the just-inserted messages now looking mangled
and the preexisting ones seemingly restored
The problem is that our `line-prefix' values use display specs with
pixel widths, which is needed for speakers with variable-width faces and
non-ascii chars. (Based on a cursory glance at relevant sections of the
manual, it doesn't look like there's an easy way to adjust these
automatically.) For now, I'm proposing we include a command to manually
traverse and refill target buffers. Luckily, this is much faster than
it'd be with some other `erc-fill-function' because no actual "filling"
takes place. We're just remeasuring speaker tags and replacing existing
display-spec values.
If you're affected by these bugs, please try these patches. Thanks.
[0001-5.6-Prefer-ticks-hz-pairs-for-erc-timestamp-values-o.patch (text/x-patch, attachment)]
[0002-5.6-Fix-date-stamp-invisibility-in-erc-fill-wrap.patch (text/x-patch, attachment)]
[0003-5.6-Add-command-to-refill-buffer-with-erc-fill-wrap-.patch (text/x-patch, attachment)]
This bug report was last modified 1 year and 28 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.