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#46775: 27.1; ERC: Track: Modified channels doc and `erc-track-find-face' fixes Date: Wed, 07 Jul 2021 05:30:41 -0700 Message-ID: <87tul671ce.fsf__23868.2004668348$1625661079$gmane$org@neverwas.me> References: <3089116.bT80LyP3VS@ravel> <877dj3xk3e.fsf@neverwas.me> <2016416.4WAli8B44Z@ravel> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12605"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-erc@gnu.org, 46775@debbugs.gnu.org To: Olivier Certner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 07 14:31:15 2021 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 1m16hv-0003B2-GS for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Jul 2021 14:31:15 +0200 Original-Received: from localhost ([::1]:53892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m16hu-0005Cq-IS for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Jul 2021 08:31:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m16hl-00059n-JK for bug-gnu-emacs@gnu.org; Wed, 07 Jul 2021 08:31:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39532) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m16hi-0004uV-3Q for bug-gnu-emacs@gnu.org; Wed, 07 Jul 2021 08:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m16hh-0005GR-Vi for bug-gnu-emacs@gnu.org; Wed, 07 Jul 2021 08:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "J.P." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Jul 2021 12:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46775 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 46775-submit@debbugs.gnu.org id=B46775.162566105620224 (code B ref 46775); Wed, 07 Jul 2021 12:31:01 +0000 Original-Received: (at 46775) by debbugs.gnu.org; 7 Jul 2021 12:30:56 +0000 Original-Received: from localhost ([127.0.0.1]:51078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m16hb-0005G7-O3 for submit@debbugs.gnu.org; Wed, 07 Jul 2021 08:30:55 -0400 Original-Received: from mail-108-mta226.mxroute.com ([136.175.108.226]:40953) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m16hZ-0005Fr-Fk for 46775@debbugs.gnu.org; Wed, 07 Jul 2021 08:30:53 -0400 Original-Received: from filter004.mxroute.com ([149.28.56.236] filter004.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta226.mxroute.com (ZoneMTA) with ESMTPSA id 17a80f2f8c7000ae11.001 for <46775@debbugs.gnu.org> (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Wed, 07 Jul 2021 12:30:44 +0000 X-Zone-Loop: db45c3eba4322792375138c5a8604214e358dca07f8c X-Originating-IP: [149.28.56.236] In-Reply-To: <2016416.4WAli8B44Z@ravel> (Olivier Certner's message of "Tue, 06 Jul 2021 18:34:48 +0200") X-AuthUser: masked@neverwas.me X-Zone-Spam-Resolution: no action X-Zone-Spam-Status: No, score=-0.1, required=15, tests=[ARC_NA=0, FROM_HAS_DN=0, RCPT_COUNT_THREE=0, TO_DN_SOME=0, FREEMAIL_TO=0, MIME_GOOD=-0.1, FROM_EQ_ENVFROM=0, MIME_TRACE=0, RCVD_COUNT_ZERO=0, FREEMAIL_ENVRCPT=0, MID_RHS_MATCH_FROM=0, NEURAL_SPAM=0] 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" Xref: news.gmane.io gmane.emacs.bugs:209586 Archived-At: Olivier Certner writes: > The trick is that `erc-track-minor-mode' may be enabled or disabled > independently of the whole module. In particular, it may not be activated at > all if the (global) keybindings it wants to install, which don't abide by the > rules for minor modes maps, are already bound at the time of module's > activation. Right, thanks for patiently explaining an RTFM-worthy question. So like the doc string says: "for the sole purpose of providing the C-c C-SPC and C-c C-@ keybindings" (basically for toggling during sessions). I guess I was dazed into a stupor by encountering two global minor modes for the same module with only the word "-minor" to distinguish them. Anyway, it's obviously decades too late to reconsider modules doubling as minor modes. But perhaps it's still worth reexamining `erc-update-modules' at some point. As a quick aside: Currently, we rely on a module's options for conveying per-connection specifics, when supported. Some options, like `erc-enable-logging', are buffer local but require extra attention to exploit on a per-connection basis. And while the macro `erc-define-module' does have a `local-p' param, I don't think it's actually being used anywhere. This is probably in part due to `erc-update-modules' only ever enabling (and never disabling) modules and also running just a hair too early, i.e., right before a new ERC buffer is made current. Perhaps a discussion dedicated to this topic may be beneficial at some point. > `erc-user-is-active' seems in fact to be used for more than one purpose. In > particular, it also triggers an update of channels in the mode line. What's > exactly the problem with hooking on 001? The 001 hook only runs in server buffers. And when it does, `erc-server-connected' is always nil. > There is a lot of room for improvement in this module. In particular in > determining how some user is "active" (none of the current possibilities > really suits my needs). Then hopefully we can (eventually) make it smarter. I get the feeling this module, when fully realized, might provide an experience that's actually superior to that offered by dedicated clients.