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:02 -0700 Message-ID: <87a5tobby9.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="20120"; 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:44 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 1qgvJH-00051l-Vk for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Sep 2023 00:59:44 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgvIe-0004hr-5X; 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-0004gG-4H 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 1qgvIY-0000oH-RJ for bug-gnu-emacs@gnu.org; Thu, 14 Sep 2023 18:58:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qgvId-0007bz-Qp for bug-gnu-emacs@gnu.org; Thu, 14 Sep 2023 18:59:03 -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:03 +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.169473230929176 (code B ref 65882); Thu, 14 Sep 2023 22:59:03 +0000 Original-Received: (at 65882) by debbugs.gnu.org; 14 Sep 2023 22:58:29 +0000 Original-Received: from localhost ([127.0.0.1]:41440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgvI5-0007aQ-2D for submit@debbugs.gnu.org; Thu, 14 Sep 2023 18:58:29 -0400 Original-Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:52610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgvGu-0007Y1-Pi for 65882@debbugs.gnu.org; Thu, 14 Sep 2023 18:57:17 -0400 Original-Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-69002ef0104so1242249b3a.1 for <65882@debbugs.gnu.org>; Thu, 14 Sep 2023 15:57:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694732224; x=1695337024; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:subject:to:from :from:to:cc:subject:date:message-id:reply-to; bh=6oUqeerZuj/ocIe9DWxnmiX1cn14O8dlthw+NGlDB3A=; b=RRDocckgybvSYMEzxjJrnnVFnp9VxgZwYuSHHHp05Qr5q96P6PiyWN8KU7LMBiimj+ h9CZILEAHc+alJXpiTAqWWLscADgeR0+Ydv/sKV8HTv9NY0cr7b1QauinTJFWmgijAuL wFrhPX44jfjB/EINNTDsrSltxCxCgC/Ao7sFMgU2vrtBb/u/kAvpWKZZjj6efq13i4M3 dhfBug+GV16VGySVDDZTHIrKlouFQOZr/Q3BE23kVC4Bzimq+/CCbwkch6ZtWVVwzIrv tEwuiLzBG4suTuqjPXt2ZeWShiRZek9UIjeyGWm8/o+S73Jtx9kMzgXcQWZ5ABn82sK3 1Z+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694732224; x=1695337024; h=mime-version:user-agent:message-id:date:references:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6oUqeerZuj/ocIe9DWxnmiX1cn14O8dlthw+NGlDB3A=; b=qhxrr3gKQTSv9o7IL2ySn64IhVVw/fTK3sAcnGnTgtq3KVweT7fqNTxuT0PGm0BZs6 CoilcIhUMGbkg344xrqnSNb6VAm2bcVqnzkvGxDFu9MOMb4Z+BpL5kUEQ00EQ6wr5VdR lcVCwNIFVFGDcYycRZoHEXOMcFD4f4a7iPPqOASsn6kfhvXlm6OiNxBj5PihXCEnmw89 d4RVfXdVEiO8F4X3yAM7cJMc11Uo5HGAHu9f3C489HPbsyAMWhMqYwFpxZhNU7xtMcVr 4lq2jLlK4sT080FvUZll/BRS0vSYCA4e319IgwEHEluwDiwAcaaGE8pcPnp/Gg0K5hNp F06Q== X-Gm-Message-State: AOJu0YwTwzubyTy8/uR7RdgPMFxH+J7BVFrvNdeNEI75JG2hbURiZOqf x8VttQyvW+u1j93HDXVwIGZL4DuR7/Y= X-Google-Smtp-Source: AGHT+IGnQiChsK6CUxxLQ2NbQYuD5oHoof0OzTx29bY+9qkbtvz1Zkr7xPsNgtCoQGNuRY3uGvGq3g== X-Received: by 2002:a05:6a00:c90:b0:68f:e0f0:85f4 with SMTP id a16-20020a056a000c9000b0068fe0f085f4mr10591pfv.25.1694732224211; Thu, 14 Sep 2023 15:57:04 -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 d21-20020aa78695000000b006889511ab14sm1795876pfo.37.2023.09.14.15.57.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 15:57:03 -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:270465 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