From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Trevor Arjeski Newsgroups: gmane.emacs.bugs Subject: bug#73580: 29.4; ERC 5.6.1-git: erc-nicks does not respect pal and fool faces Date: Wed, 02 Oct 2024 10:40:25 +0300 Message-ID: <871q0zgdg6.fsf__11202.4071205937$1727854949$gmane$org@gmail.com> References: <87y13796p1.fsf@trevarch.mail-host-address-is-not-set> <87y137i36d.fsf@neverwas.me> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16177"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73580@debbugs.gnu.org, emacs-erc@gnu.org To: "J.P." Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 02 09:42:20 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1svu03-00044l-FS for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 02 Oct 2024 09:42:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svtzn-0005c8-S4; Wed, 02 Oct 2024 03:42:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svtzm-0005Xn-Fb for bug-gnu-emacs@gnu.org; Wed, 02 Oct 2024 03:42:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1svtzm-0008Jh-1W for bug-gnu-emacs@gnu.org; Wed, 02 Oct 2024 03:42:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=bFkr8PYyYijDfcr18PrFKXzHDeacx55rYToIf1Q2nCA=; b=DBTZs7drS6mPFv2E7b2YCdKocFmm0xZGWxw3jpj6kPhyEKT9eM1O+aKQUIQ457K+93FkMECCqChBjetfz8+FR4lLqy/OaC9rkT/xGJhyaz7+A1DqjUnwCUW4rV3MtLufd86F+4lRxhwxk/JVXSFzrQ1WPgMpki10ffJMo6/AkT2/uJKPgqwXP0l8GC45/hIYP9LSTXt7608J/egpxHzxNfPs+GmheQdGG1Dhsp6RfIwtVkyXj0C6s3sa7eh01NEEyETKNA/XYinDBF/GV9zpGwytmvoVK4/IChrd3rh0Ces6heKLhhuv53qz1EG+dOvBMwDK8JVNcdGYsk+XtQxQpw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1svtzl-0006jO-OY for bug-gnu-emacs@gnu.org; Wed, 02 Oct 2024 03:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Trevor Arjeski Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Oct 2024 07:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73580 X-GNU-PR-Package: emacs Original-Received: via spool by 73580-submit@debbugs.gnu.org id=B73580.172785489625814 (code B ref 73580); Wed, 02 Oct 2024 07:42:01 +0000 Original-Received: (at 73580) by debbugs.gnu.org; 2 Oct 2024 07:41:36 +0000 Original-Received: from localhost ([127.0.0.1]:56483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svtzL-0006iI-Vr for submit@debbugs.gnu.org; Wed, 02 Oct 2024 03:41:36 -0400 Original-Received: from mail-lj1-f176.google.com ([209.85.208.176]:47501) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svtzJ-0006i4-AX for 73580@debbugs.gnu.org; Wed, 02 Oct 2024 03:41:34 -0400 Original-Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2fad0f66d49so41661191fa.3 for <73580@debbugs.gnu.org>; Wed, 02 Oct 2024 00:41:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727854827; x=1728459627; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=bFkr8PYyYijDfcr18PrFKXzHDeacx55rYToIf1Q2nCA=; b=S8H8g5r0onXFLOufCsNPU3Bd+jpCNzgQnj6TKIzvzb1CGt/TBHXuyBxb5pAo84ij3m KFvClVnCib5pz28KqIGER4/7lP+h7NlsfN5b3UmQxtT10CzgnbccA/i1tJc7WmKrJJVT ouYHOf49NGCyF+Eicr47YAeyWxPG/0jiVnUVSM/G9audrDmGi7oiJFYQ7mhdPX8HRuAA HrfbWO3QAm+m8x9gQyoC5vSmX1iN9wUMWa2U4FA+mPtoQr0mBCSrf2/QAU/Dof8zGivD hWkiCn+l/dKab4bLTKcLaco35gV9NK7K+cvAR9NkC3PVnahwTYuO5h/BGB87ndp3urZz MpCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727854827; x=1728459627; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=bFkr8PYyYijDfcr18PrFKXzHDeacx55rYToIf1Q2nCA=; b=vE0pIMHR1vxjHZUjWdinpQmD4S7yIxshlmgKbnmq6M1+gvbGjBsLxwBzTAUhad+kTZ jJlK4hIDatqguXXsbhxtsVBo+0HCSqyptdg69dx6pTv+dMQqGAGNPwNYiJv8h0AYzLcu +XRMXeHvUyFQZw/JG7ijpWNBS5m2gKA6fTIIJocqKID0igHneyWHiOWAukMna2M9E5+G e2T8mdAOVvawPe8DoR1fyt8bVoIIebhbLOCwqqyzBGiYSclPu0G+rW7VwweIlxzXNTsY RZ58RuEGp4QWnwq5y40UKRkz+fNpwq+8SEdY/Te0/ClWVtg+v2p+6KOm2LoQoqYo2swL u/Fg== X-Gm-Message-State: AOJu0Yy0h17FzuFPM2hAkqVe7WqUyhMMdvtxbwBTg85NCWC9LtHflekP CjGZfrQPleFbn3XWmy0XEhF2cGovXGCaQ3gf34FW5NOMJtYL3cri X-Google-Smtp-Source: AGHT+IEppPb4ItmI3Q9Afm/R/2vHUzKBHxNyp6vOh2CmMwoWr7eZoEZ7BD0ocBzLQRQMrOx8xXM9xQ== X-Received: by 2002:a05:6512:b90:b0:52c:c032:538d with SMTP id 2adb3069b0e04-539a0685048mr964842e87.27.1727854826502; Wed, 02 Oct 2024 00:40:26 -0700 (PDT) Original-Received: from trevarch (109-252-46-106.nat.spd-mgts.ru. [109.252.46.106]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5389fd54835sm1825902e87.1.2024.10.02.00.40.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Oct 2024 00:40:25 -0700 (PDT) In-Reply-To: <87y137i36d.fsf@neverwas.me> (J. P.'s message of "Tue, 01 Oct 2024 20:39:22 -0700") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:292826 Archived-At: "J.P." writes: Agreed that it's not good to couple nicks and match. > Thanks for the bug report. The good news is I can definitely reproduce > this. :) > > But whether it's a bug and how to go about addressing it is a bit more > involved, I'm afraid. As luck would have it, this issue or something > similar actually comes up every now and again but not so much in the > context of `nicks' (or `erc-highlight-nicks' before it). > > Anyway, as you may have noticed, the `nicks' module formally depends on > the `button' module and a new (5.6+) `button'-provided interface: > `erc-button--modify-nick-function'. IMO, this coupling is an acceptable > trade-off because `nicks' can piggyback on the token scanning that > `button' provides. The `button' module itself runs its code at depth 30 > on `erc-insert-modify-hook', which is earlier than the `match' module's > 50. This means it applies its faces _before_ `match' ever touches > them. I see now. I did notice the depths being different but couldn't really grok what was going on at the moment and went for more of a "hack it till it works" approach. > What probably threw you off in perhaps thinking `match' had a say before > `nicks' was the presence of useless faces from `match' in the default > value of the option `erc-nicks-skip-faces'. That's indeed my bad: they > shouldn't be there at all (and a patch to fix this would be most > welcome). To that end, I'd much prefer we kept `nicks' and `match' as > loosely coupled as possible for the sake of long-term maintainability, > although I'm sure your current proposal is quite effective from a purely > pragmatic POV. I did notice this and tinkered with it, but didn't really find anything significant when removing the pal and fool faces from it. Thanks for the detailed explanation. I did go through with the "traditional" approach of adding 'nick-or-keyword, but sadly gave up. Honestly, the more I looked at ERC, the more I realized that I don't want pals to be highlighted at all. This makes my first patch irrelevant since the whole idea is to use one single face color every time a nick appears (similar to weechat's nick highlighting). The same goes for a fool, who may appear dimmed, but when someone else mentions the fool you will see their nick as the color that erc-nicks assigns. > If you're saying `nicks' _should_ highlight your own > speaker tags (or should optionally do so), please explain. This is again about consistency with seeing your own nick within brackets () and in messages that other people send (when erc-current-nick-highlight-type is 'nick-or-keyword). Not sure what to do! I think we can just close this bug for now.