From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manphiz Newsgroups: gmane.emacs.bugs Subject: bug#65882: 29.1; rcirc doesn't rejoin channels automatically on reconnecting Date: Thu, 14 Sep 2023 15:57:44 -0700 Message-ID: <878r98bbx3.fsf@debian-hx90.lan> References: <87bke85hsb.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19946"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) To: Stefan Kangas , 65882@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 15 00:59:42 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 1qgvJF-0004zp-Uo for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Sep 2023 00:59:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgvIe-0004ht-DI; Thu, 14 Sep 2023 18:59:04 -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 1qgvIZ-0004gX-Fn for bug-gnu-emacs@gnu.org; Thu, 14 Sep 2023 18:58:59 -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 1qgvIZ-0000om-8E for bug-gnu-emacs@gnu.org; Thu, 14 Sep 2023 18:58:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qgvIe-0007c6-7o for bug-gnu-emacs@gnu.org; Thu, 14 Sep 2023 18:59:04 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87bke85hsb.fsf@gmail.com> Resent-From: Manphiz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Sep 2023 22:59:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65882 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 65882-submit@debbugs.gnu.org id=B65882.169473231029183 (code B ref 65882); Thu, 14 Sep 2023 22:59:04 +0000 Original-Received: (at 65882) by debbugs.gnu.org; 14 Sep 2023 22:58:30 +0000 Original-Received: from localhost ([127.0.0.1]:41442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgvI5-0007aX-JB for submit@debbugs.gnu.org; Thu, 14 Sep 2023 18:58:30 -0400 Original-Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:58420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgvHa-0007Z3-IN for 65882@debbugs.gnu.org; Thu, 14 Sep 2023 18:57:59 -0400 Original-Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-577f6b414a4so1164409a12.0 for <65882@debbugs.gnu.org>; Thu, 14 Sep 2023 15:57:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694732266; x=1695337066; darn=debbugs.gnu.org; h=mime-version:message-id:date:user-agent:references:subject:to:from :from:to:cc:subject:date:message-id:reply-to; bh=6oUqeerZuj/ocIe9DWxnmiX1cn14O8dlthw+NGlDB3A=; b=ncUIitIUt41RjVEjAHlzI1nJVvQf/80GfrNnJKlZ17hmqjKOpSbI8lpw/ZP3Cd60zR cU3dFYI3ocrDRelvYOMG/UvvNDboFPlUIRt+tiFwWjriqfsNGHLSNFTku3H0LmgYo9S/ bbKlxjv43kn51T1UjeEAWbTkfiYE4Oaes4DmivlcXn3TXNmFrq0kMUuspkqPwMAGU5XY AtHWx9Di3PEPU+LeH4CApPoNt+sn61xcgSw0ixLi8QqDmvUnLbkjN1Ko87LYrAak6C1b gn7rKcifnRTyrHfwU4Y/5e3Dj0qGcEl0GQ2vyNbyM85HXVE7cPDEupUaWhFjQhJ7ZAWX YbpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694732266; x=1695337066; h=mime-version:message-id:date:user-agent:references:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6oUqeerZuj/ocIe9DWxnmiX1cn14O8dlthw+NGlDB3A=; b=dz562rgGNJpxNxIUQ+QD3J39hfpC08DsTPTlrgjcjIN7iIwTq4JlVFtEMfJ7Y8YjlR nhkUIZlXK0S6npJ+c3RfdqhzJsQnaBkh1XncVuqz/hm+bcPRcx4jdrrPFQ2x3OHPIwYj IyWybFHYqTi2jX4x6julnRC6K0anX+pp2ecnyg9xDZFB9g+5CXjwmifeL90+3ZsczBgl JqPXsYpP6t+nnq6xYwf+fasfTC+BukDDSP34cOw1+ftD9j64H6Zxy7TE3Y4xnODAVu9H 682RKQLAAQ5OiaLzOiNls01Qd01ft6L+zUQSRorAQWJ+hgN5FPVsd7o+N32G/yG7whSB hR2A== X-Gm-Message-State: AOJu0YyJTbIRbeFmTh9b8QzxRQhve9gF+9HKt5gD0+exVgW41X1oC2tj SENozGQz/ecXWbZJSB3zpRThJ1uYVOs= X-Google-Smtp-Source: AGHT+IGSSyLZtCU5AaGBgi3aDJcBNTlwOqKVR4tNOacF5ytsOQK2GbV8yrxf5zbxQn/UtPu14iT/zw== X-Received: by 2002:a05:6a20:4285:b0:14d:d9f8:83f8 with SMTP id o5-20020a056a20428500b0014dd9f883f8mr247887pzj.1.1694732266289; Thu, 14 Sep 2023 15:57:46 -0700 (PDT) Original-Received: from debian-hx90 (2603-8000-a400-0cdc-c54c-06cf-f115-8a08.res6.spectrum.com. [2603:8000:a400:cdc:c54c:6cf:f115:8a08]) by smtp.gmail.com with ESMTPSA id v14-20020a63150e000000b005781e026905sm212010pgl.56.2023.09.14.15.57.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 15:57:45 -0700 (PDT) X-Mailman-Approved-At: Thu, 14 Sep 2023 18:58:25 -0400 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:270464 Archived-At: Manphiz writes: > I have a setting of rcirc that automatically authenticates to NickServ > and automatically join a list of channels[1]. This works when > connecting to the servers for the first time. However, when it gets > disconnected from the servers (e.g. due to network issues) and > reconnecting, it can still auto-authenticate, but won't rejoin the > channels automatically again. > > After some debugging, it turns out that the first time it authenticates > successfully, it will set rcirc-user-authenticated to `t'[2]. When > reconnecting, it will check whether the user is authenticated and only > run the rcirc-authenticated-hook if not[3]. As > rcirc-user-authenticateed will be `t' after the first time, the hook > won't be processed again and hence preventing from rejoining the > channels. > > I have tested a patch that resets rcirc-user-authenticated to `nil' that > fixes this issue (tested on 28.2 and 29.1), which is attached inline below. > > [1] https://gitlab.com/xiyueden/emacs.d/-/blob/master/init.el?ref_type=heads#L224-272 > [2] https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/net/rcirc.el#n3343 > [3] https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/net/rcirc.el#n3320 > > > diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el > index 1ddffe8dec9..b293a4a442f 100644 > --- a/lisp/net/rcirc.el > +++ b/lisp/net/rcirc.el > @@ -859,6 +859,7 @@ If QUIET is non-nil, no not emit a message." > (if (rcirc--connection-open-p process) > (throw 'exit (or quiet (message "Server process is alive"))) > (delete-process process)) > + (setq rcirc-user-authenticated nil) > (let ((conn-info rcirc-connection-info)) > (setf (nth 5 conn-info) > (cl-remove-if-not #'rcirc-channel-p > Hi Stefan, I noticed that you lowered the severity of this bug from "normal" to "wishlist". AIUI rcirc provides a way to automatically join channels upon connecting to a server and currently this is not working as intended, so IMHO it should be considered a bug instead of a feature request (a wishlist). (If you are using severity as a means to manage bug triage priority I'm OK with that.) Personally, as the patch is sufficiently trivial, I would hope it won't take too much work for a review. But I would understand if dealing with rcirc-user-authenticated is more involved than it looks like and should be handled with care. Thanks! -- Manphiz