From unknown Mon Aug 11 21:14:41 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#73580 <73580@debbugs.gnu.org> To: bug#73580 <73580@debbugs.gnu.org> Subject: Status: 29.4; ERC 5.6.1-git: erc-nicks does not respect pal and fool faces Reply-To: bug#73580 <73580@debbugs.gnu.org> Date: Tue, 12 Aug 2025 04:14:41 +0000 retitle 73580 29.4; ERC 5.6.1-git: erc-nicks does not respect pal and fool = faces reassign 73580 emacs submitter 73580 Trevor Arjeski severity 73580 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 01 11:36:11 2024 Received: (at submit) by debbugs.gnu.org; 1 Oct 2024 15:36:11 +0000 Received: from localhost ([127.0.0.1]:52128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svev4-0005de-3R for submit@debbugs.gnu.org; Tue, 01 Oct 2024 11:36:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:58554) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svev1-0005dX-3N for submit@debbugs.gnu.org; Tue, 01 Oct 2024 11:36:08 -0400 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 1sveuy-0005uA-4w for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2024 11:36:04 -0400 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sveuu-0006SX-H0 for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2024 11:36:03 -0400 Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2faccada15bso24852501fa.3 for ; Tue, 01 Oct 2024 08:35:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727796957; x=1728401757; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=WDaIcM9m3FlkwGJkVFS8x6gHwzZtUoyF09kUXoZFE7A=; b=DY/2zSs4ScvBPj43dGOWiY12yZoJs2rlwPn9hbaiqw53psk01efsfTppIAdyiv5Zpt YxqiguTvyuIzF6V0OXjSqWXwCSN3mib3Zsd0CKH5nLQMa8xyXAUfnlflJQ7faGg3dZED zvO6vC0xdDpH5YHmBPUEdHuo9cayLnzsGyW93+g8MqGs/FUJyR/9RNR/2SOdTNA28MOj qVEcmed7xf68qFHs+KEDbfSwzZAny1sBPdXhtyF9FA0B6K5Zp3clgINK3aqAft1H8pV3 bKtUGYa4w2Kgc5KWxTzfnpDK4hvqUjyBWWS9O8kK7VJcr8OgO2SV0vf9V8gAHVQLDocV mnew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727796957; x=1728401757; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=WDaIcM9m3FlkwGJkVFS8x6gHwzZtUoyF09kUXoZFE7A=; b=Qq4E+Gf6dkCPnEUnB9C8+7E/9HIXQCJWZNE3w97r2XskdLFP1YxdwxH+X553ojWzUd dB+ecLW1RSeCe3gPkZm3YXntgdzEbWcvo5VDFKrVYoAiBgyPjtJ1veBbtLU15SyNcYVx S52Zmz/y2lMV1Y9Lafd9Zdgxj15BiTY0j0DU3kCuLFiYmt7Si0VKA+ZEWieHKn5GcWSf O7fW9iyuPlOjj5iKm2X+3vvwvE7dwJrxz911TomDzVXR3vG9/M8014tqhLU1cQFt38hw RbGvqgu0dBJyTqDurypeVnJCi3ozdGSTYlfVEXiD+x9tyfLXCxcAyj0k0xHpffPP9UYN trIw== X-Gm-Message-State: AOJu0YwTRoCAAE/qRAJgDacpANqQGQPgXivZl3TNJgaJZfAxnRexEDns +0z2prviNg+1NhaTpcReVeGh5pEXZPNtE6iARvR8iXDpZXPWa01areHfpg== X-Google-Smtp-Source: AGHT+IF5t6udlLxmBgbPnq2IbR+9/cxGu9czvJhYEspBHv8b81fblBAq/XHKj+TCe1C+c0b3dB4JDw== X-Received: by 2002:a05:6512:10cd:b0:539:9fb4:802f with SMTP id 2adb3069b0e04-5399fb48084mr214861e87.22.1727796956262; Tue, 01 Oct 2024 08:35:56 -0700 (PDT) Received: from localhost (109-252-46-106.nat.spd-mgts.ru. [109.252.46.106]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-538a0444274sm1615249e87.285.2024.10.01.08.35.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 08:35:55 -0700 (PDT) From: Trevor Arjeski To: bug-gnu-emacs@gnu.org Subject: 29.4; ERC 5.6.1-git: erc-nicks does not respect pal and fool faces X-Debbugs-CC: emacs-erc@gnu.org Date: Tue, 01 Oct 2024 18:35:54 +0300 Message-ID: <87y13796p1.fsf@trevarch.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::22f; envelope-from=tmarjeski@gmail.com; helo=mail-lj1-x22f.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-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain The erc-nicks module does not respect erc-pal-face and erc-fool-face when assigning a face for a nick, specifically when a user writes a message that includes a nick of a pal or fool, leading to the faces being different in the nick tag () and the message (ex. "your_nick: hi"). Reproduction config: (use-package erc :defer t :config (custom-set-faces `(erc-pal-face ((t (:foreground "red"))))) (setopt erc-modules (seq-union '(nicks) erc-modules)) :custom (erc-nicks-colors '("yellow")) (erc-pals '("trev"))) In the above config, you will notice that "" will be red, but when someone mentions "trev" in a message, the nick will be yellow (instead of red). Attached is a proposed patch. Feedback needed and welcome! --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Make-erc-nicks-respect-pal-and-fool-faces.patch Content-Description: proposed patch for fix >From b4edb60f15a6b49c6b5443f0769a0d2cf33e1ff8 Mon Sep 17 00:00:00 2001 From: Trevor Arjeski Date: Tue, 1 Oct 2024 18:21:02 +0300 Subject: [PATCH] Make erc-nicks respect pal and fool faces The erc-nicks colors should not highlight over a nick that is a pal or a fool. This change checks if the nick is a pal or a fool and uses the respective face in erc-nicks--face-table from there on out. --- erc-nicks.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erc-nicks.el b/erc-nicks.el index a0d6d17..e8258ef 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,9 @@ 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 (or (when (erc-match-pal-p nick nil) 'erc-pal-face) + (when (erc-match-fool-p nick nil) 'erc-fool-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 --=-=-= Content-Type: text/plain In GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.0) Windowing system distributor 'The X.Org Foundation', version 11.0.12101013 System Description: Arch Linux Configured using: 'configure --with-x-toolkit=gtk3 --with-native-compilation=aot --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib --with-tree-sitter --localstatedir=/var --with-cairo --disable-build-details --with-harfbuzz --with-libsystemd --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto' 'LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto' 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LC_ALL: en_US.UTF-8 value of $LC_CTYPE: en_US.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/l Minor modes in effect: erc-track-mode: t erc-track-minor-mode: t erc-spelling-mode: t erc-ring-mode: t erc-netsplit-mode: t erc-menu-mode: t erc-match-mode: t erc-list-mode: t erc-irccontrols-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t erc-scrolltobottom-mode: t erc-imenu-mode: t erc-pcomplete-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-autojoin-mode: t erc-networks-mode: t global-git-commit-mode: t shell-dirtrack-mode: t server-mode: t envrc-global-mode: t envrc-mode: t editorconfig-mode: t ws-butler-global-mode: t ws-butler-mode: t global-treesit-auto-mode: t diff-hl-flydiff-mode: t global-diff-hl-mode: t diff-hl-mode: t electric-pair-mode: t rainbow-delimiters-mode: t apheleia-global-mode: t apheleia-mode: t corfu-popupinfo-mode: t global-corfu-mode: t corfu-mode: t marginalia-mode: t vertico-mode: t which-key-mode: t global-ligature-mode: t ligature-mode: t global-auto-revert-mode: t global-display-line-numbers-mode: t display-line-numbers-mode: t desktop-save-mode: t recentf-mode: t save-place-mode: t straight-use-package-mode: t straight-package-neutering-mode: t override-global-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t column-number-mode: t line-number-mode: t auto-fill-function: do-auto-fill transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /home/trev/.emacs.d/straight/build/external-completion/external-completion hides /usr/share/emacs/29.4/lisp/external-completion /home/trev/.emacs.d/straight/build/transient/transient hides /usr/share/emacs/29.4/lisp/transient /home/trev/.emacs.d/straight/build/jsonrpc/jsonrpc hides /usr/share/emacs/29.4/lisp/jsonrpc /home/trev/.emacs.d/straight/build/eglot/eglot hides /usr/share/emacs/29.4/lisp/progmodes/eglot /home/trev/.emacs.d/straight/build/xref/xref hides /usr/share/emacs/29.4/lisp/progmodes/xref /home/trev/.emacs.d/straight/build/project/project hides /usr/share/emacs/29.4/lisp/progmodes/project /home/trev/.emacs.d/straight/build/flymake/flymake hides /usr/share/emacs/29.4/lisp/progmodes/flymake /home/trev/.emacs.d/straight/build/erc/erc-button hides /usr/share/emacs/29.4/lisp/erc/erc-button /home/trev/.emacs.d/straight/build/erc/erc-backend hides /usr/share/emacs/29.4/lisp/erc/erc-backend /home/trev/.emacs.d/straight/build/erc/erc-ibuffer hides /usr/share/emacs/29.4/lisp/erc/erc-ibuffer /home/trev/.emacs.d/straight/build/erc/erc-compat hides /usr/share/emacs/29.4/lisp/erc/erc-compat /home/trev/.emacs.d/straight/build/erc/erc-capab hides /usr/share/emacs/29.4/lisp/erc/erc-capab /home/trev/.emacs.d/straight/build/erc/erc hides /usr/share/emacs/29.4/lisp/erc/erc /home/trev/.emacs.d/straight/build/erc/erc-status-sidebar hides /usr/share/emacs/29.4/lisp/erc/erc-status-sidebar /home/trev/.emacs.d/straight/build/erc/erc-identd hides /usr/share/emacs/29.4/lisp/erc/erc-identd /home/trev/.emacs.d/straight/build/erc/erc-replace hides /usr/share/emacs/29.4/lisp/erc/erc-replace /home/trev/.emacs.d/straight/build/erc/erc-sasl hides /usr/share/emacs/29.4/lisp/erc/erc-sasl /home/trev/.emacs.d/straight/build/erc/erc-speedbar hides /usr/share/emacs/29.4/lisp/erc/erc-speedbar /home/trev/.emacs.d/straight/build/erc/erc-notify hides /usr/share/emacs/29.4/lisp/erc/erc-notify /home/trev/.emacs.d/straight/build/erc/erc-pcomplete hides /usr/share/emacs/29.4/lisp/erc/erc-pcomplete /home/trev/.emacs.d/straight/build/erc/erc-list hides /usr/share/emacs/29.4/lisp/erc/erc-list /home/trev/.emacs.d/straight/build/erc/erc-autoaway hides /usr/share/emacs/29.4/lisp/erc/erc-autoaway /home/trev/.emacs.d/straight/build/erc/erc-xdcc hides /usr/share/emacs/29.4/lisp/erc/erc-xdcc /home/trev/.emacs.d/straight/build/erc/erc-networks hides /usr/share/emacs/29.4/lisp/erc/erc-networks /home/trev/.emacs.d/straight/build/erc/erc-page hides /usr/share/emacs/29.4/lisp/erc/erc-page /home/trev/.emacs.d/straight/build/erc/erc-truncate hides /usr/share/emacs/29.4/lisp/erc/erc-truncate /home/trev/.emacs.d/straight/build/erc/erc-lang hides /usr/share/emacs/29.4/lisp/erc/erc-lang /home/trev/.emacs.d/straight/build/erc/erc-sound hides /usr/share/emacs/29.4/lisp/erc/erc-sound /home/trev/.emacs.d/straight/build/erc/erc-fill hides /usr/share/emacs/29.4/lisp/erc/erc-fill /home/trev/.emacs.d/straight/build/erc/erc-loaddefs hides /usr/share/emacs/29.4/lisp/erc/erc-loaddefs /home/trev/.emacs.d/straight/build/erc/erc-ring hides /usr/share/emacs/29.4/lisp/erc/erc-ring /home/trev/.emacs.d/straight/build/erc/erc-join hides /usr/share/emacs/29.4/lisp/erc/erc-join /home/trev/.emacs.d/straight/build/erc/erc-desktop-notifications hides /usr/share/emacs/29.4/lisp/erc/erc-desktop-notifications /home/trev/.emacs.d/straight/build/erc/erc-stamp hides /usr/share/emacs/29.4/lisp/erc/erc-stamp /home/trev/.emacs.d/straight/build/erc/erc-netsplit hides /usr/share/emacs/29.4/lisp/erc/erc-netsplit /home/trev/.emacs.d/straight/build/erc/erc-goodies hides /usr/share/emacs/29.4/lisp/erc/erc-goodies /home/trev/.emacs.d/straight/build/erc/erc-track hides /usr/share/emacs/29.4/lisp/erc/erc-track /home/trev/.emacs.d/straight/build/erc/erc-ezbounce hides /usr/share/emacs/29.4/lisp/erc/erc-ezbounce /home/trev/.emacs.d/straight/build/erc/erc-common hides /usr/share/emacs/29.4/lisp/erc/erc-common /home/trev/.emacs.d/straight/build/erc/erc-imenu hides /usr/share/emacs/29.4/lisp/erc/erc-imenu /home/trev/.emacs.d/straight/build/erc/erc-services hides /usr/share/emacs/29.4/lisp/erc/erc-services /home/trev/.emacs.d/straight/build/erc/erc-spelling hides /usr/share/emacs/29.4/lisp/erc/erc-spelling /home/trev/.emacs.d/straight/build/erc/erc-match hides /usr/share/emacs/29.4/lisp/erc/erc-match /home/trev/.emacs.d/straight/build/erc/erc-menu hides /usr/share/emacs/29.4/lisp/erc/erc-menu /home/trev/.emacs.d/straight/build/erc/erc-dcc hides /usr/share/emacs/29.4/lisp/erc/erc-dcc /home/trev/.emacs.d/straight/build/erc/erc-log hides /usr/share/emacs/29.4/lisp/erc/erc-log /home/trev/.emacs.d/straight/build/eldoc/eldoc hides /usr/share/emacs/29.4/lisp/emacs-lisp/eldoc /home/trev/.emacs.d/straight/build/seq/seq hides /usr/share/emacs/29.4/lisp/emacs-lisp/seq Features: (shadow sort mail-extr emacsbug vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs bug-reference magit-patch magit-subtree magit-extras magit-gitignore magit-ediff ediff ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util face-remap debug backtrace semantic/symref/grep grep semantic/symref semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet pulse dabbrev files-x cl-print erc-ibuffer erc-log erc-notify erc-page erc-services erc-sound erc-speedbar speedbar ezimage dframe erc-truncate erc-xdcc erc-dcc shortdoc help-fns radix-tree network-stream nsm erc-track erc-spelling flyspell ispell erc-ring erc-nicks erc-netsplit erc-menu erc-match erc-list erc-goodies erc-imenu erc-pcomplete erc-button erc-fill erc-stamp erc-join cus-start epa-file erc erc-backend erc-networks erc-common erc-compat erc-loaddefs term/xterm xterm nerd-icons-dired nerd-icons nerd-icons-faces nerd-icons-data nerd-icons-data-mdicon nerd-icons-data-flicon nerd-icons-data-codicon nerd-icons-data-devicon nerd-icons-data-sucicon nerd-icons-data-wicon nerd-icons-data-faicon nerd-icons-data-powerline nerd-icons-data-octicon nerd-icons-data-pomicon nerd-icons-data-ipsicon magit-bookmark magit-submodule magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit package url-handlers magit-repos magit-apply magit-wip magit-log which-func magit-diff smerge-mode git-commit log-edit message sendmail yank-media puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader add-log magit-core magit-autorevert magit-margin magit-transient magit-process with-editor shell server magit-mode browse-url benchmark magit-git magit-base magit-section cursor-sensor crm dash apheleia apheleia-rcs apheleia-dp apheleia-formatters apheleia-utils apheleia-log apheleia-formatter-context casual-ibuffer casual-ibuffer-filter ibuf-ext casual-ibuffer-settings casual-ibuffer-version casual-ibuffer-utils ibuffer ibuffer-loaddefs casual-dired casual-dired-settings dired-aux casual-dired-version casual-dired-sort-by casual-dired-utils casual-dired-variables elint checkdoc lisp-mnt thingatpt image-dired image-dired-tags image-dired-external image-dired-util xdg image-mode exif wdired dired-x dired dired-loaddefs casual-avy casual-avy-version casual-lib casual-lib-version org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete pcomplete org-list org-footnote org-faces org-entities noutline outline ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs find-func cal-menu calendar cal-loaddefs org-version org-compat org-macs imenu transient format-spec envrc inheritenv editorconfig editorconfig-core editorconfig-core-handle editorconfig-fnmatch ws-butler treesit-auto treesit cape corfu-doc-terminal avl-tree generator corfu-doc corfu-terminal popon orderless consult bookmark undo-fu ace-window avy xref project compile text-property-search comint ansi-osc ring comp comp-cstr warnings mule-util jka-compr time-date diff-hl-flydiff diff diff-hl log-view pcvs-util vc-dir ewoc vc rainbow-mode ansi-color color vc-git diff-mode vc-dispatcher parinfer-rust-mode parinfer-rust-changes parinfer-rust track-changes parinfer-rust-helper url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util url-parse auth-source eieio eieio-core password-cache json map url-vars mailcap elec-pair rainbow-delimiters init erc-init cus-edit pp cus-load icons erc-autoloads markdown-mode-autoloads geiser-guile-autoloads geiser-autoloads rust-mode-autoloads parinfer-rust-mode-autoloads eglot-autoloads track-changes-autoloads jsonrpc-autoloads flymake-autoloads project-autoloads external-completion-autoloads eldoc-autoloads vterm-autoloads nerd-icons-dired-autoloads nerd-icons-autoloads diff-hl-autoloads magit-autoloads with-editor-autoloads magit-section-autoloads dash-autoloads rainbow-mode-autoloads apheleia-autoloads casual-ibuffer-autoloads casual-dired-autoloads casual-avy-autoloads casual-lib-autoloads transient-autoloads envrc-autoloads inheritenv-autoloads editorconfig-autoloads rainbow-delimiters-autoloads ws-butler-autoloads treesit-auto-autoloads cape-autoloads corfu-doc-terminal-autoloads corfu-doc-autoloads corfu-terminal-autoloads popon-autoloads orderless-autoloads corfu-popupinfo byte-opt corfu corfu-autoloads consult-autoloads marginalia marginalia-autoloads vertico compat compat-30 vertico-autoloads compat-autoloads info seq-autoloads undo-fu-autoloads ace-window-autoloads avy-autoloads which-key which-key-autoloads xref-autoloads use-package-diminish diminish diminish-autoloads doom-themes-ext-org doom-nord-theme pcase doom-themes doom-themes-base doom-themes-autoloads finder-inf rx ligature ligature-autoloads autorevert filenotify display-line-numbers desktop frameset recentf tree-widget wid-edit saveplace edmacro kmacro straight-autoloads straight subr-x cl-extra help-mode cl-macs gv use-package-bind-key bind-key easy-mmode cl-seq use-package-core cl-loaddefs cl-lib bytecomp byte-compile early-init rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 879903 1108074) (symbols 48 37842 200) (strings 32 188756 93623) (string-bytes 1 7685901) (vectors 16 93443) (vector-slots 8 2283381 1172880) (floats 8 774 3386) (intervals 56 25857 51054) (buffers 984 53)) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 01 13:56:26 2024 Received: (at submit) by debbugs.gnu.org; 1 Oct 2024 17:56:26 +0000 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 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 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 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 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) 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) From: Trevor Arjeski To: bug-gnu-emacs@gnu.org Subject: Re: 29.4; ERC 5.6.1-git: erc-nicks does not respect pal and fool faces 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") References: <87y13796p1.fsf@trevarch.mail-host-address-is-not-set> Date: Tue, 01 Oct 2024 20:56:17 +0300 Message-ID: <8734lfogfy.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= 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 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 02 01:46:47 2024 Received: (at 73580) by debbugs.gnu.org; 2 Oct 2024 05:46:48 +0000 Received: from localhost ([127.0.0.1]:56295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svsCF-0000f5-1K for submit@debbugs.gnu.org; Wed, 02 Oct 2024 01:46:47 -0400 Received: from relay3-s.mailbaby.net ([208.73.205.254]:60030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svsCC-0000en-68 for 73580@debbugs.gnu.org; Wed, 02 Oct 2024 01:46:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbaby.net; q=dns/txt; s=bambino; bh=JcdpUzZcYkMdiZ3oBtFYsDHNGqTXETvRVDJT3b8Mfls=; h=from:subject:date:message-id:to:cc:mime-version:content-type:in-reply-to:references:feedback-id; b=VPaz9L4yT7+Vs50DQd9TSuPC7JQl7xlUAD/smNESHSB6VMpQ2iAlK18vd+mORIsK+PAoU6mlC X0OXMQaXv+Pqp+WTCuq5Gs3N1DmKD9adfyY4hBPOIbLhPAs+B+a9ZBEGo/CnimVqXkcQa2YpYeq lPq52WJiOcbD5yfFxkzhY/w= Received: from zmta1 ([45.76.59.163] 45.76.59.163.vultrusercontent.com) (Authenticated sender: mb25440) by relay3-s.mailbaby.net (MailBabyMTA) with ESMTPSA id 1924b5494e4000dfd0.001 for <73580@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Wed, 02 Oct 2024 03:44:47 +0000 X-Zone-Loop: 232440aa5e1469939066829a5cc4ec4f0c58f1d8584b X-MB-ID: mb25440 Feedback-ID: 25440:1924b5494e4000dfd0:45.76.59.163:mbaby Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by zmta1 (ZoneMTA) with ESMTPSA id 1924b4fabd10003e01.001 for <73580@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Wed, 02 Oct 2024 03:39:25 +0000 X-Zone-Loop: 94ed57269cf9388b5f46defbfa5e72285390ab0f287d X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=JcdpUzZcYkMdiZ3oBtFYsDHNGqTXETvRVDJT3b8Mfls=; b=KbwZ1i3D3vFzaRuWIjd9agbfmq /1cB0/ngWEX1lFixO4UmhtT+v7BqVNzgSaVb+OM5IapL1RLWFRzhRKEBn5XgTwfwZHsp+uOTKU/UQ NrmjXljC5iZWCXdNHtx6aEG/NUi/gMVfxIWt8ODKjrh+wrJVOJjrl844QvJVmaRDOF6hTtuahlTD7 9S3iETFQGXlv3TmzS924Ps1hepl75CMFXry1u/J/JFrTl8LDED7xd69mVpqS9FeDov8FiHvTXUnau Dz9fe5TbtQj6LTjzgPQBTD97UJOHE4l2m2WySFv28jU79Pf9G9vHZCdPDqfKaP19yh/AkhWMckR+m 0PanM3Zg==; From: "J.P." To: Trevor Arjeski Subject: Re: bug#73580: 29.4; ERC 5.6.1-git: erc-nicks does not respect pal and fool faces 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") References: <87y13796p1.fsf@trevarch.mail-host-address-is-not-set> Date: Tue, 01 Oct 2024 20:39:22 -0700 Message-ID: <87y137i36d.fsf@neverwas.me> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Authenticated-Id: masked@neverwas.me X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73580 Cc: 73580@debbugs.gnu.org, emacs-erc@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Trevor Arjeski writes: > The erc-nicks module does not respect erc-pal-face and erc-fool-face > when assigning a face for a nick, specifically when a user writes a > message that includes a nick of a pal or fool, leading to the faces > being different in the nick tag () and the message > (ex. "your_nick: hi"). > > Reproduction config: > > (use-package erc > :defer t > :config > (custom-set-faces > `(erc-pal-face ((t (:foreground "red"))))) > (setopt erc-modules > (seq-union '(nicks) erc-modules)) > :custom > (erc-nicks-colors '("yellow")) > (erc-pals '("trev"))) > > In the above config, you will notice that "" will be red, but when > someone mentions "trev" in a message, the nick will be yellow (instead > of red). > > Attached is a proposed patch. Feedback needed and welcome! 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. 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. FWIW, the way `match' has always "worked" is that each category ("fool", "keyword", etc.) has an accompanying "match type," like `keyword', `nick', `message', etc., configured by an option like `erc-current-nick-highlight-type'. However, unlike the "current-nick" and "keyword" categories, "pal" and "fool" don't offer an equivalent of `nick-or-keyword' or `keyword' for their corresponding highlight options. This accounts for the undesirable behavior you observe (why mentions aren't ever highlighted). It likely won't surprise you to hear that expanding the match-type selection of "fool" and "pal" to full parity with those of the other categories has actually been suggested many times over in the past. In fact, ISTR at least one patch/gist thingy floating around somewhere on the wiki webs that purports to tackle this. In terms of approaches, I think a more "modern" solution would address this task by mimicking the way `nicks' modifies message text (but only when `button' is loaded or slated to be via membership in `erc-modules'). That is, it'd apply its faces indirectly by hooking into `erc-button--modify-nick-function'. However, such an approach would also likely involve more surgery (possibly a full refactor of `erc-match-message'). And without adequate test coverage, I'd be reticent to go that route. (BTW, the entire `match' module is severely under-covered, so anything to remedy the situation would also be welcome.) As for a more traditional, non-`button' approach: I might be amenable to a super minimal patch so long as it leaves a very light footprint. A rough plan would be something like: 1. Add `keyword' and `nick-or-keyword' to highlight-type options for fools and pals. 2. Ensure the "-p" predicates for fools and pals consider the entire message. IIRC, only one of them does. 3. In, `erc-match-message', either modify the `keyword' case in the giant `cond' or add a new one for non-"current-nick" `keyword' and `nick-or-keyword' types to search and replace all pals and fools in the message body (possibly including the speaker tag, for the `nicks-or-keyword' variant). (I'm probably missing something, but you get the idea.) If you're willing to try this, I can help with benchmarking and adding tests. No pressure though, obviously. Also, I very much appreciate all code contributions, even those we don't end up using. > I did a bit more testing and realized that the problem is also occuring for erc-current-nick. > > Here is an updated patch: > > 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 > [...] > > (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)))) ~~~~~~~~~~~~~~~~ Actually, when I said I could reproduce the bug, I only meant WRT pals and fools. This last face is used for so-called "input" messages, which are outgoing messages taken from input at the prompt (which you probably already knew). If you're saying `nicks' _should_ highlight your own speaker tags (or should optionally do so), please explain. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 02 03:41:36 2024 Received: (at 73580) by debbugs.gnu.org; 2 Oct 2024 07:41:36 +0000 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 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 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) 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) From: Trevor Arjeski To: "J.P." Subject: Re: bug#73580: 29.4; ERC 5.6.1-git: erc-nicks does not respect pal and fool faces In-Reply-To: <87y137i36d.fsf@neverwas.me> (J. P.'s message of "Tue, 01 Oct 2024 20:39:22 -0700") References: <87y13796p1.fsf@trevarch.mail-host-address-is-not-set> <87y137i36d.fsf@neverwas.me> Date: Wed, 02 Oct 2024 10:40:25 +0300 Message-ID: <871q0zgdg6.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73580 Cc: 73580@debbugs.gnu.org, emacs-erc@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "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. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 02 18:47:32 2024 Received: (at 73580-done) by debbugs.gnu.org; 2 Oct 2024 22:47:32 +0000 Received: from localhost ([127.0.0.1]:59476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sw884-0006fd-0l for submit@debbugs.gnu.org; Wed, 02 Oct 2024 18:47:32 -0400 Received: from mail-108-mta97.mxroute.com ([136.175.108.97]:45279) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sw882-0006fT-6j for 73580-done@debbugs.gnu.org; Wed, 02 Oct 2024 18:47:30 -0400 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta97.mxroute.com (ZoneMTA) with ESMTPSA id 1924f6ab51c0003e01.001 for <73580-done@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Wed, 02 Oct 2024 22:47:26 +0000 X-Zone-Loop: bc0819402f1786b94365395ccecc260a89498b86b3c4 X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=dxq/FjFMN4jdYoDXucUC/ZtU4dl3tPduGTwp2scSs3M=; b=Ry6FYYXjDv1fqeUaoQ/kACJZ+n 6mQx6fdnXXn+BL0GH9YxetQ/M7ytF4HXu03CipN3hv5dFO/WoP2+U8LAbbuSgU2dHNyV7X0ZTCeqF KK3we1DALDuOAtm7WYacTS6f02htuDkeW2Z8ROWidPxuxI7a8e3fQ6Au6PmeBNokcamVZuB+Rsa8f bVZxr3xq1nWF3Mi7orMSzGgw77TR8PEJqnr+vAAy+HS6Ls9WvelXSZPLAM/ykuATgR7kT6/PndnB+ FxnVN4AFoAv+NRbmomdKmTAqRWDDDZ+V7XffbUjxeP7VaK+cOAo1V2U4dfeSOHAwTTaYytOgACPlS vZXpV2Aw==; From: "J.P." To: Trevor Arjeski Subject: Re: bug#73580: 29.4; ERC 5.6.1-git: erc-nicks does not respect pal and fool faces In-Reply-To: <871q0zgdg6.fsf@gmail.com> (Trevor Arjeski's message of "Wed, 02 Oct 2024 10:40:25 +0300") References: <87y13796p1.fsf@trevarch.mail-host-address-is-not-set> <87y137i36d.fsf@neverwas.me> <871q0zgdg6.fsf@gmail.com> Date: Wed, 02 Oct 2024 15:47:22 -0700 Message-ID: <87cykicebp.fsf@neverwas.me> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Authenticated-Id: masked@neverwas.me X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 73580-done Cc: 73580-done@debbugs.gnu.org, emacs-erc@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Trevor Arjeski writes: > Thanks for the detailed explanation. I did go through with the > "traditional" approach of adding 'nick-or-keyword, but sadly gave up. Actually, I think I steered you wrong with that outline thingy (apologies if that led to a wild goose chase). As you've rightly observed, the only implementation of `nick-or-keyword' is for "current-nick", and it behaves rather unintuitively (the one for "keyword" is a no-op). From the doc: `nick-or-keyword' - highlight the nick of the user who typed your nickname, or all instances of the current nickname if there was no sending user Anyway, mimicking that behavior for "fool" and "pal" obviously won't do. I think we'd instead want a new variant, something like a `keyword-all' to highlight all occurrences of a given nick, whether they be in a speaker tag, an opening address "mention: ", or otherwise. > 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. I believe what I said above applies here too re the either/or proposition imposed by the "match types" currently on offer. >> 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). Hm, I guess I was confused by the `erc-my-nick-face' in ((equal nick (erc-current-nick)) 'erc-my-nick-face)))) because that concerns the face your speaker tag appears in when you submit a comment at the prompt. Confusingly, it's actually unrelated to `erc-current-nick-face', which is the face your mentions appear in after being treated by `match' (or, as noted above, the face your mentioners appear in with match types `nick-or-keyword' and `nick'). To avoid such confusion in the future, I think we should supplement those non-namespaced faces in erc-match.el with preferred aliases, like `erc-match-current-nick' (new faces aren't supposed to be suffixed with "-face", I've learned). Anyway, FWIW, there are actually existing, though perhaps somewhat roundabout ways to force all occurrences of your nick to use the same face (if that's ultimately what you're after): With `match': (use-package erc :custom (erc-modules `(nicks ,@erc-modules))) (use-package erc-match :custom-face (erc-current-nick-face ((t ( :weight unspecified :foreground unspecified :inherit erc-my-nick-face))))) Without `match': (use-package erc :custom (erc-modules `(nicks ,@(remq 'match erc-modules)))) (use-package erc-nicks :custom-face (erc-nicks-trev@Libera.Chat-face ((t (:inherit (erc-button-nick-default-face erc-my-nick-face)))))) Perhaps one of these should go in the manual's Sample Config. > Not sure what to do! I think we can just close this bug for now. I've gone ahead and done that, but feel free to continue discussing should anything related arise (though you may have to unarchive the bug beforehand if weeks go by). Cheers. From unknown Mon Aug 11 21:14:41 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 31 Oct 2024 11:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator