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: Tue, 01 Oct 2024 20:56:17 +0300 Message-ID: <8734lfogfy.fsf@gmail.com> References: <87y13796p1.fsf@trevarch.mail-host-address-is-not-set> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20133"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 73580@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 01 19:57:36 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 1svh7v-0004tI-5H for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Oct 2024 19:57:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svh7S-0004M1-R5; Tue, 01 Oct 2024 13:57:06 -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 1svh7Q-0004Lq-Cz for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2024 13:57:04 -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 1svh7Q-0006OV-4N for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2024 13:57:04 -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=XOZCkaau3l5KQO0vgnyoq3G1ZVrGZl1Ki5uDUrweieg=; b=ki2pltxoDVR7s+TrgUOllck1hetIJBzHeGR37QSt0ofl2ccQ2aUht24ADFCEIwZnOeOXNhYrgj25PhtawM8tpc0i+5V6R51YOuS67Vw9iVFB6ZSlPqyGwGuy9HQyyX2bZlK3Jyqd/ZjL8f1E4qn8zW05Em6Fg2AKnbu3k6EW7folprBcvrW1owQA5MJPkcyjafv/tu27z7+TpqIRE81/jPmyt86ycjsC1STfDaOe1Veie+IZqRg25aRmhM1h/jp88mtYNDP7+RwKAiERGixkny/xugbEYZLAPSH5QPSAcsqqWzELA6HvsI7QK6BLkErCLCcRTK5mtUsvZCZ0jxapNA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1svh7O-0002ps-Ch for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2024 13:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Trevor Arjeski Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Oct 2024 17:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73580 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.172780538610871 (code B ref -1); Tue, 01 Oct 2024 17:57:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Oct 2024 17:56:26 +0000 Original-Received: from localhost ([127.0.0.1]:52760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svh6o-0002pH-Gs for submit@debbugs.gnu.org; Tue, 01 Oct 2024 13:56:26 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:35294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svh6m-0002pA-Rb for submit@debbugs.gnu.org; Tue, 01 Oct 2024 13:56:25 -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 1svh6n-0004KN-7L for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2024 13:56:25 -0400 Original-Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1svh6l-0006Ne-Ps for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2024 13:56:25 -0400 Original-Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-5398e7dda5fso3084425e87.0 for ; Tue, 01 Oct 2024 10:56:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727805381; x=1728410181; darn=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=XOZCkaau3l5KQO0vgnyoq3G1ZVrGZl1Ki5uDUrweieg=; b=gMuddCmXUN3ZQ99c+u0qV1QXtND4lihD6EKgE0jCrKNHQAUOvTDu5+BDyJoRUORF0r zVa2O9O76v1W9WtpB242UvwRWLXXQZ0z+Tyau3haXrSuSQ6juFpd9JGhIpa8vdYMZgMj Ys29rlGsc3OOI3N72R8Z2NLT9mSp71tMwBqHmupYlxHrdyRoAgpJwaSlMp23cxyoGyUA ZFchTenvYPYlxWDQgeiSSNcg1Txhy9v5+CHc49iXJMDuhxloVw7b2Pk4dnA/CBvjBmX6 k6BdkoTdLxRl7QTh+27JwZMo6Rov0zGOrl2+ID1nau7aUgcndAF/hlnLsrKRGPEVChaL 3oUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727805381; x=1728410181; 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=XOZCkaau3l5KQO0vgnyoq3G1ZVrGZl1Ki5uDUrweieg=; b=gR0czwuSZwCOfG8uTLSlwDtaybW6DVLQVX7VctlvwvG51Ffta87UEWDH7b6SpkgNAc D7VOtC8TlTgXVqBC7B5gra/WCmm9hduckprbI811HrpuPOEXXMb00glMl+5hztrwJJCz KPR4lCg1PokKzbngclHNIhGOpss+pNfMhB47Y7XRYxkKNGThpeisnQDG4tEac1Czd2fs lL/eSOZbYBZN/Szr9nKInBR+YYaTtmXd9i1W9O87zshB8cxxe6ctdUneqKRo6jNqLXVu UzfA4Co32e7V9VUvfberDxphccYTn1tzBn8aa7uym+RRbUrNaQ/Osdcd5O82ekY1RKyI 2X/A== X-Gm-Message-State: AOJu0YwLavS9Ym+99mMXcuSpW+NqDwErapray94cfk2mF43MY3sdC1yE Pq9ZvXhavbSsYr4O1sczmq/II+ennObnay7d0l0lC3bWC+KcezhLIau7zg== X-Google-Smtp-Source: AGHT+IEDa/Oe7ZK+9p3z9iwRLhxWodxu0EAOicFXAMHPTjCQKOp6aeDEZWY0NxopZ9nI3GrzV1hSHg== X-Received: by 2002:a05:6512:1328:b0:52e:98f6:c21f with SMTP id 2adb3069b0e04-539a06637e8mr198122e87.16.1727805380895; Tue, 01 Oct 2024 10:56:20 -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-5389fd5f383sm1667922e87.118.2024.10.01.10.56.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 10:56:19 -0700 (PDT) In-Reply-To: <87y13796p1.fsf@trevarch.mail-host-address-is-not-set> (Trevor Arjeski's message of "Tue, 01 Oct 2024 18:35:54 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=tmarjeski@gmail.com; helo=mail-lf1-x131.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:292775 Archived-At: --=-=-= Content-Type: text/plain I did a bit more testing and realized that the problem is also occuring for erc-current-nick. Here is an updated patch: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Make-erc-nicks-respect-priority-faces.patch Content-Description: patch fix v2 >From 88b01b15219d86aac2c8670f86d6001368bb04d1 Mon Sep 17 00:00:00 2001 From: Trevor Arjeski Date: Tue, 1 Oct 2024 20:48:04 +0300 Subject: [PATCH] Make erc-nicks respect priority faces The erc-nicks colors should not highlight over a nick that is a pal, fool or current nick. This change, when preparing a nick face, checks if a nick is a pal, fool or current nick and uses the respective face in erc-nicks--face-table from there on out. --- erc-nicks.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erc-nicks.el b/erc-nicks.el index a0d6d17..360b7fa 100644 --- a/erc-nicks.el +++ b/erc-nicks.el @@ -67,6 +67,7 @@ ;;; Code: (require 'erc-button) +(require 'erc-match) (require 'color) (defgroup erc-nicks nil @@ -464,6 +465,10 @@ Favor a custom erc-nicks-NICK@NETWORK-face when defined." (erc-network-name) "-face"))) ((or (and (facep face) face) (erc-nicks--revive face face nick (erc-network)))))) + (let ((face (cond ((erc-match-pal-p nick t) 'erc-pal-face) + ((erc-match-fool-p nick t) 'erc-fool-face) + ((equal nick (erc-current-nick)) 'erc-my-nick-face)))) + (puthash nick face table)) (let ((color (erc-nicks--determine-color key)) (new-face (make-symbol (concat "erc-nicks-" nick "-face")))) (put new-face 'erc-nicks--nick nick) -- 2.46.2 --=-=-=--