From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "J.P." Newsgroups: gmane.emacs.bugs Subject: bug#72736: 31.0.50; ERC 5.6.1: Keep ban lists in sync Date: Sat, 24 Aug 2024 11:03:45 -0700 Message-ID: <87msl123y6.fsf__42460.757475213$1724522683$gmane$org@neverwas.me> References: <87plq3551s.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="16881"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-erc@gnu.org To: 72736@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 24 20:04:34 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 1shv7p-0004FC-Mq for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Aug 2024 20:04:34 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1shv7X-0000sl-TL; Sat, 24 Aug 2024 14:04:15 -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 1shv7W-0000sX-EF for bug-gnu-emacs@gnu.org; Sat, 24 Aug 2024 14:04:14 -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 1shv7W-0007UI-4s for bug-gnu-emacs@gnu.org; Sat, 24 Aug 2024 14:04:14 -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=wEL5i/gKB2KgwzqtK5j54Hi4ETgo+WdAxd+mWijDQFk=; b=cid9RKXSqKlFaZkXqDLyQih+HxZAKqEPwC4m6XNZqVW6JLM20tTBJBy46kn+XHYM6exsGO4bDuGVj/996WPL5oADh6E0NAWAqQO9VqzEMiiF5FNd0L30S7RMePQ+L+1G04tC5i+nf5PNUDO9fvuTq6JA/Ea5tZOoFqSSTUMOOaWTVNg2d/pwJpP+evUuTPEMp0igrU3mQy+HWZ8SJRG74S2dk4X/v6z9f4+ynoekqJJYwhvFLOeNWaL7lvz6EBXBK1oanXAFyvfgjy+HVwIkvib2KMmskVj4E2sCQQ6c0mlXL7dmVJecuiIJYiQH/vFBMKDJsnYgVXBnzGuawdKa0g==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1shv8I-0006kV-AK for bug-gnu-emacs@gnu.org; Sat, 24 Aug 2024 14:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "J.P." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Aug 2024 18:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72736 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 72736-submit@debbugs.gnu.org id=B72736.172452268325906 (code B ref 72736); Sat, 24 Aug 2024 18:05:02 +0000 Original-Received: (at 72736) by debbugs.gnu.org; 24 Aug 2024 18:04:43 +0000 Original-Received: from localhost ([127.0.0.1]:41880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shv7y-0006jm-LS for submit@debbugs.gnu.org; Sat, 24 Aug 2024 14:04:43 -0400 Original-Received: from mail-108-mta110.mxroute.com ([136.175.108.110]:35665) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shv7u-0006jb-Q3 for 72736@debbugs.gnu.org; Sat, 24 Aug 2024 14:04:40 -0400 Original-Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta110.mxroute.com (ZoneMTA) with ESMTPSA id 191858f05ef0003e01.001 for <72736@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sat, 24 Aug 2024 18:03:48 +0000 X-Zone-Loop: 23658bae0fcdabbf4d3b15425674535bb674c9b19885 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=wEL5i/gKB2KgwzqtK5j54Hi4ETgo+WdAxd+mWijDQFk=; b=HsyNNz8bEZguMbenmq/hBnhJby HZDfd+tWqEbMBmF0C80bN7XRPWKLsiXCyt/IYrH4Bfy/hNzQM4Qn1g9AA9WWm94rEKL9bgJDxdGqP xb0tgHGZ43j92tZA39Pj18BJ23pTCYn4tbwGsXm0XKuCLAni5anIFR7ZL2Q9Iy0yfJ6snnnLGNaKp RZ/qMt1ONLiigDjzohmHu/jm6bc0y1JnEbdGwUotp7b1GNWOg/CimUZPDifKokoujMItOf4LiHt/g mELYYPMrE5mgFFP7gppxqzARph1qx/DVkSrFNOMpZrFYAttj/6SC8aU0hd8MIitOFx8dtQBfLbAUx DGSToKxg==; In-Reply-To: <87plq3551s.fsf@neverwas.me> (J. P.'s message of "Tue, 20 Aug 2024 13:10:23 -0700") X-Authenticated-Id: masked@neverwas.me 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:290686 Archived-At: "J.P." writes: > +(cl-defmethod erc--handle-channel-mode (_ (_ (eql ?b)) state arg) > + ;; Add or remove a ban from `erc-channel-banlist'. > + (erc--banlist-update state arg)) Both for clarity and compatibility with the current behavior, I think we should instead keep `erc-channel-banlist' empty (and locally unbound) until formally initialized for a given channel within an ERC session. An easy way to do that would be to guard the above like so: (when erc--channel-banlist-synchronized-p (erc--banlist-update state arg)) > + > ;; We could specialize on type C, but that may be too brittle. > (cl-defmethod erc--handle-channel-mode (_ (_ (eql ?l)) state arg) > "Update channel user limit, remembering ARG when STATE is non-nil." As far as re-syncing on reconnect, that's probably better handled by an actual module (if anyone feels like writing one). We could move all the ban-list stuff to a new file and maybe offer an alternate display style for interactive use, perhaps one based on `tabular-list-mode' or similar.