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#63595: 30.0.50; ERC 5.6: Add buffer-list and nick-list modules Date: Thu, 31 Aug 2023 06:30:43 -0700 Message-ID: <87jztbxrss.fsf__36011.6186014906$1693488745$gmane$org@neverwas.me> References: <87lehkt97a.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="33706"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-erc@gnu.org To: 63595@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 31 15:32:18 2023 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 1qbhmU-0008ck-Dg for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 31 Aug 2023 15:32:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbhmF-0000Ng-4O; Thu, 31 Aug 2023 09:32: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 1qbhm7-00009P-3R for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 09:31:57 -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 1qbhm6-0000QW-RH for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 09:31:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qbhmE-0005wE-MM for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 09:32: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: Thu, 31 Aug 2023 13:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63595 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 63595-submit@debbugs.gnu.org id=B63595.169348866322757 (code B ref 63595); Thu, 31 Aug 2023 13:32:02 +0000 Original-Received: (at 63595) by debbugs.gnu.org; 31 Aug 2023 13:31:03 +0000 Original-Received: from localhost ([127.0.0.1]:55187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbhlG-0005uy-Vi for submit@debbugs.gnu.org; Thu, 31 Aug 2023 09:31:03 -0400 Original-Received: from mail-108-mta174.mxroute.com ([136.175.108.174]:36677) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbhlF-0005uj-2a for 63595@debbugs.gnu.org; Thu, 31 Aug 2023 09:31:02 -0400 Original-Received: from mail-111-mta2.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta174.mxroute.com (ZoneMTA) with ESMTPSA id 18a4bca1d85000d7b6.001 for <63595@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Thu, 31 Aug 2023 13:30:51 +0000 X-Zone-Loop: c9f6a538591f4b723329c8c71e0cd867051bc32e5d71 X-Originating-IP: [136.175.111.2] 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=mVa6qeFhp+GrQ5fpeaXwyPLz4llE2/+sV6yXZtxt0/4=; b=L8u1SrlRfLDbaYkPLoF6WE/Nzo OXWqKt2M/hx5qW+efJeANBmhtmKKw/hL4Wi3ruxAOchi7HEMAnccoSnlDi0O64rl8O1Q0cMeOoB2R mEGyk8R8v4523uUlTNVUR+Q7IPpTR1HMN6EhFkhNJ3TeQY4c8Lwy4BvUsrN9TAXQVFuWTN0ba/VY6 eINpXUgGldDawlGwRdsURIz3H5U1eYqH3QkLABidNkqHgsnXQCS70wjXWguQtVJjYWkH8QMr5d3Wd sH85jruR2BC/QZ2H3wxzM8YoD7rE7IfCXELak5BkVHvCUJTPGzcgkO7wWKS6v6mDsI900c4o0eIt7 82x3u67A==; In-Reply-To: <87lehkt97a.fsf@neverwas.me> (J. P.'s message of "Fri, 19 May 2023 12:25:29 -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:268819 Archived-At: This feature introduced a couple auxiliary modules to serve as higher level wrappers around newer functionality that was awkwardly bolted onto the existing libraries erc-status-sidebar and erc-speedbar. One of the stated aims of this bug's initial proposal was to unify the UI for this flavor of transitory, command-focused module [1]. However, anyone paying close enough attention will have noticed I've already faltered in this regard. Look at the minor-mode toggle `erc-bufbar-mode' and notice that, when disabling, it tears down the mode completely, destroying all assets. To make it easy to show and hide its window without alternately shutting down and starting anew with every other toggle, I turned to contextually overloading the existing commands `erc-status-sidebar-toggle' and friends to behave specially when `erc-bufbar-mode' is active [2]. Contrast this with the approach taken for `erc-nickbar-mode', whose namesake command is of the all-in-one, kitchen-sink variety. Toggling off merely hides its window and preserves the speedbar session (its hidden frame, buffer, etc.). To actually kill it off completely, you invoke the toggle with a negative prefix argument. Obviously, these must be reconciled somehow, or one must be made to mimic the other. I'm leaning toward changing `nickbar' by adding a second command to toggle it without shutting it down, and then having the main minor-mode toggle always do a full shutdown. This probably aligns more with prevailing expectations and traditional Emacs semantics that assume a nil `erc-nickbar-mode' variable indicates not only a logical disabled activation state but that the mode is completely destroyed. Therefore, unless anyone has any better ideas, I'll provide a patch shortly that does something to this effect. Thanks. [1] To recap, the trend in recent years has been to downplay the use of a module's minor-mode toggle as a viable entry point for enabling its functionality. Rather, there's been a focus on emphasizing membership in `erc-modules' as the preferred means of doing so. The reasons are manifold but ultimately rooted in attaining more predictable behavior and tighter inter-module interop across the board. However, this paradigm necessarily couples a module's activation state to the lifetime of an IRC session, which doesn't always make sense. Some modules, by their very nature, are intrinsically interactive and ephemeral. IOW, they're minor-modes first and modules second. [2] Note the traditional library namespace prefix, which probably hampers discoverability for users of the module. We could alias the transitory toggles (at least) to reflect the new module names, but that may just confuse things further because the new options would all continue to sport library prefixes.