From: Alcor via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "J.P." <jp@neverwas.me>
Cc: 69860@debbugs.gnu.org,
Alcor via General discussion about ERC <emacs-erc@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 [thread overview]
Message-ID: <87frwkq0ll.fsf__20810.6584542961$1710955970$gmane$org@tilde.club> (raw)
In-Reply-To: <875xxhkmfo.fsf@neverwas.me> (J. P.'s message of "Wed, 20 Mar 2024 07:27:55 -0700")
[-- Attachment #1: Type: text/plain, Size: 1781 bytes --]
"J.P." <jp@neverwas.me> writes:
> Alcor <alcor@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.
[-- Attachment #2: erc-c99-test-sender.png --]
[-- Type: image/png, Size: 24314 bytes --]
[-- Attachment #3: erc-c99-test-recvr.png --]
[-- Type: image/png, Size: 27225 bytes --]
next prev parent reply other threads:[~2024-03-20 17:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-17 16:31 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) Alcor via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-17 17:16 ` J.P.
[not found] ` <87wmq0srrz.fsf@neverwas.me>
2024-03-17 17:23 ` Alcor via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <87zfuwojpt.fsf@tilde.club>
2024-03-20 14:27 ` J.P.
[not found] ` <875xxhkmfo.fsf@neverwas.me>
2024-03-20 17:23 ` Alcor via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
[not found] ` <87frwkq0ll.fsf@tilde.club>
2024-03-28 17:31 ` J.P.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='87frwkq0ll.fsf__20810.6584542961$1710955970$gmane$org@tilde.club' \
--to=bug-gnu-emacs@gnu.org \
--cc=69860@debbugs.gnu.org \
--cc=alcor@tilde.club \
--cc=emacs-erc@gnu.org \
--cc=jp@neverwas.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.