From unknown Sat Sep 13 03:53:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79250: 31.0.50; ERC 5.7: Improve the track module's erc-fools integration Resent-From: "J.P." Original-Sender: "Debbugs-submit" Resent-CC: emacs-erc@gnu.org, bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Aug 2025 02:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 79250 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 79250@debbugs.gnu.org Cc: emacs-erc@gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: emacs-erc@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17553129159311 (code B ref -1); Sat, 16 Aug 2025 02:56:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 Aug 2025 02:55:15 +0000 Received: from localhost ([127.0.0.1]:40193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1un74c-0002PI-BX for submit@debbugs.gnu.org; Fri, 15 Aug 2025 22:55:15 -0400 Received: from lists.gnu.org ([2001:470:142::17]:60530) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1un74X-0002ME-78 for submit@debbugs.gnu.org; Fri, 15 Aug 2025 22:55:11 -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 1un74R-0000YV-BB for bug-gnu-emacs@gnu.org; Fri, 15 Aug 2025 22:55:03 -0400 Received: from mail-108-mta52.mxroute.com ([136.175.108.52]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1un74O-0000Sg-DP for bug-gnu-emacs@gnu.org; Fri, 15 Aug 2025 22:55:03 -0400 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta52.mxroute.com (ZoneMTA) with ESMTPSA id 198b0c88081000025c.001 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sat, 16 Aug 2025 02:49:46 +0000 X-Zone-Loop: adc68e3e5755e31866c97464a9d31fcb8918b12dea20 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:Subject:To:From:Sender: Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=zsxOg/vPTO+mVUtv1ji/rjvd8917XqI3h+TNgZZ5BrM=; b=jcoQtg/CXfVKOdz/z7duFOYTRY 9nn2gy7cFex25KSewElQIKSR/B/SJS0ygqcFmbH2ka+6V53cznNZ98rJtgs8bRZTXMVlPVGahXxw1 dR4gQ6CHTTdbnTEVMPxulE6d4zc4ydtrqnjC91Pm64r+aApSRGUQxd4qd10L47vqNCYJKQiD419fR L8ZEGj3oVPzuH46cg+LDSnXHFRZwYK+VdCKScX7rMvjPDCjJI6ghtnvvXoM+FFcg1w3iDRFVlIL3Y kyTooxSqhyye50C4rw9Nz0L3mOJztrpWZsLWY/+8QN8SUZJLRpTh272bGOQc03XoTZ+xlCrnyrzEG e9Ifu+3w==; From: "J.P." Date: Fri, 15 Aug 2025 19:49:43 -0700 Message-ID: <874iu8t1yw.fsf@neverwas.me> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Authenticated-Id: masked@neverwas.me Received-SPF: pass client-ip=136.175.108.52; envelope-from=jp@neverwas.me; helo=mail-108-mta52.mxroute.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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) 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: -0.1 (/) --=-=-= Content-Type: text/plain Severity: wishlist Tags: patch A user on Libera.Chat recently reported that the track module's mode line segment reacts to messages from members of `erc-fools' when the option `erc-fool-highlight-type' is set to something other than `all'. Those offending variants, including the default of `nick', all arrange for applying `erc-fool-face' to only a portion of an inserted message. To reproduce from -Q: 1. Connect to a server and join a channel containing "somenick" 2. M-x erc-add-fool RET somenick RET 3. Switch away from the channel buffer 4. Notice the mode line reacts when "somenick" speaks This behavior is present in all versions at least as far back as ERC 5.3 (Emacs 27). In addition to removing `erc-fool-face' from `erc-track-faces-priority-list', setting (setopt erc-fool-highlight-type 'all erc-track-priority-faces-only 'all) is also needed to silence the mode line segment effectively. (Omitting either does not.) There are many ways to go about addressing this. One lazy possibility is shown in the attached patch, which has `track' ignore all invisible messages, though this requires users to also do (setopt erc-text-matched-hook '(erc-hide-fools)) or similar to obtain the desired effect. On the plus side, users will no longer have to fiddle with any of the other options mentioned above. In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.49, cairo version 1.18.2) of 2025-08-03 built on localhost Repository revision: c935b68bed174386f46dec6be525a23397a4b5f8 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12401008 System Description: Fedora Linux 42 (Workstation Edition) Configured using: 'configure --enable-check-lisp-object-type --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3' PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LIBOTF LIBSELINUX 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 XINERAMA XINPUT2 XPM XRANDR GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort compile comint ansi-osc ansi-color ring mail-extr emacsbug lisp-mnt message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec epa epg rfc6068 epg-config gnus-util text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils comp-run comp-common erc derived auth-source eieio eieio-core icons password-cache json map format-spec erc-backend erc-networks easy-mmode byte-opt bytecomp byte-compile erc-common inline cl-extra help-mode erc-compat cl-seq cl-macs gv pcase rx compat subr-x cl-loaddefs cl-lib erc-loaddefs 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 touch-screen 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 dynamic-setting system-font-setting font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process tty-child-frames native-compile emacs) Memory information: ((conses 16 159549 9446) (symbols 48 11837 0) (strings 32 29151 3461) (string-bytes 1 1023634) (vectors 16 17510) (vector-slots 8 189808 9616) (floats 8 35 1) (intervals 56 332 0) (buffers 1064 11)) --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-5.7-Ignore-certain-hidden-messages-in-erc-track.patch >From 71c5939046d762b939be427c0a1d18afd7fc76b7 Mon Sep 17 00:00:00 2001 From: "F. Jason Park" Date: Thu, 14 Aug 2025 20:41:04 -0700 Subject: [PATCH] [5.7] Ignore certain hidden messages in erc-track FIXME add news entry * lisp/erc/erc-track.el (erc-track-exclude-hidden): New option. (erc-track-modified-channels): Bail out if `erc-track-exclude-hidden' is non-nil and the message property `erc--invisible' is present in the table, which it is for messages from designated fools during portions of `erc-insert-modify-hook' and `erc-insert-post-hook', that is until the inserted message receives the permanent `erc--hide' property. --- lisp/erc/erc-track.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index 2897c3ede93..70d99ed16cd 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el @@ -109,6 +109,11 @@ erc-track-exclude-server-buffer server and other miscellaneous functions." :type 'boolean) +(defcustom erc-track-exclude-hidden t + "If non-nil, disregard certain normally invisible messages. +For example, ignore those marked by `erc-hide-fools'." + :type 'boolean) + (defcustom erc-track-shorten-start 1 "Minimum number of characters for a channel name in the mode-line." :type 'number) @@ -1032,6 +1037,8 @@ erc-track-modified-channels (not (let ((parsed (erc-find-parsed-property))) (or (erc-message-type-member (or parsed (point-min)) erc-track-exclude-types) + (and erc-track-exclude-hidden + (erc--check-msg-prop 'erc--invisible)) ;; Skip certain non-server-sent messages. (and (not parsed) (erc--memq-msg-prop 'erc--skip 'track)))))) -- 2.50.1 --=-=-=--