GNU bug report logs - #69860
29.2; ERC 5.6-git: erc: Incorrect face formatting applied for fg=99 bg=x (irccontrols module with erc-interpret-mirc-color=t)

Previous Next

Package: emacs;

Reported by: Alcor <alcor <at> tilde.club>

Date: Sun, 17 Mar 2024 16:35:01 UTC

Severity: normal

Found in version 29.2

Done: "J.P." <jp <at> neverwas.me>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alcor <alcor <at> tilde.club>
To: "J.P." <jp <at> neverwas.me>
Cc: 69860 <at> debbugs.gnu.org, Alcor via General discussion about ERC <emacs-erc <at> gnu.org>
Subject: bug#69860: 29.2; ERC 5.6-git: erc: Incorrect face formatting applied for fg=99 bg=x (irccontrols module with erc-interpret-mirc-color=t)
Date: Wed, 20 Mar 2024 18:23:02 +0100
[Message part 1 (text/plain, inline)]
"J.P." <jp <at> neverwas.me> writes:

> Alcor <alcor <at> tilde.club> writes:
> Here's my current understanding of what you're saying. When there's an
> existing fg/bg combo in effect for a given span, and the parsing logic
> encounters a ^Cx,99 (or a ^C99,x), the 99 shouldn't induce a clobbering
> of the corresponding "incumbent" fg (or bg) face with a dedicated (and
> superfluous) default face but instead trigger the _removal_ of said
> incumbent face. This has the effect of falling through to honor the
> relevant attributes of the underlying `erc-default-face', which ships as
> a no-op. For example, given
>
>   ^C03,08 hello ^C99,07 world
>
> the "hello " portion should be green on yellow and " world" should be
> ${default-foreground} (likely black or white) on orange. Likewise, if
> "^C99,07" were instead "^C04", then " world" should be red on yellow.
> This behavior aligns with that exhibited by Weechat and (I'm hoping)
> other popular clients. The revised patch set (attached) attempts to
> mimic this in ERC. Corrections or alternatives welcome. Thanks.

Yes, thanks for putting this in more precise words. "Clobbering" was the
term I was looking for. That was what was happening, with the 99 fg/bg
element introducing a face that clobbers the non-99 fg/bg element.

Just tried the revised patchset out on Emacs 29.2 with the latest Erc,
and things work as expected now (screenshots* attached).

Hopefully the formatting issues should be sorted out now. As usual,
thanks for the great effort & for the time invested into fixing the
"not-so-commonly-used" formatting functionality :)

+1

Cheers,
-A.

*) Checked that on both sender/receiver sides just to be sure it applies
 `erc-input-face' (for the sender) and `erc-default-face' (for the
 recipient side) correctly.

[erc-c99-test-sender.png (image/png, attachment)]
[erc-c99-test-recvr.png (image/png, attachment)]

This bug report was last modified 1 year and 49 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.