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#62044: 30.0.50; ERC 5.5: Auto-reconnect is broken Date: Sun, 01 Dec 2024 19:50:07 -0800 Message-ID: <871pyqd9qo.fsf__5917.35707582615$1733111494$gmane$org@neverwas.me> References: <87wn3rg49m.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40909"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-erc@gnu.org, xoddf2 To: 62044@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 02 04:51:26 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 1tHxT3-000ATG-Jk for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 Dec 2024 04:51:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tHxSi-00062l-Lr; Sun, 01 Dec 2024 22:51:04 -0500 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 1tHxSh-00062c-4a for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2024 22:51:03 -0500 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 1tHxSg-0002Pz-SB for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2024 22:51:02 -0500 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=/vm+V6u8jcr65PjWJ527po1JUy1gKZ7PaIvAo/0U36w=; b=kqe/pPHN/H+654NN3+TQiavGoqXS1j9era/UJMujsAZYZ5IjyHTkKR2x31F0oe81QUawcBj4sawkS1cDY7h1d8wdKhxUYBTc5O8IGLoKp+lVIsydZ2XWLAJNG+wJesnoDElIB+efqkFrhAcYa/0+McHo60H5lvvbjpuP9qHJeNTAgGpK8GzXZG4DADfhEZfmmMcHbE0LDxr1naIHx/kbnH76GNRrB6W0NRcuRjjspZNk4MOnPQO9Niy1zou6fzueSGSvNlGKH6JnR41ZTw5COu2wAemMz5iWa41ArGvCFC2EIyxdfCZfH7TusZ2WaCk78MsaJnAPZTnSq0pVKyGEPA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tHxSg-0003rg-GK for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2024 22:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "J.P." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Dec 2024 03:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62044 X-GNU-PR-Package: emacs Original-Received: via spool by 62044-submit@debbugs.gnu.org id=B62044.173311142014792 (code B ref 62044); Mon, 02 Dec 2024 03:51:02 +0000 Original-Received: (at 62044) by debbugs.gnu.org; 2 Dec 2024 03:50:20 +0000 Original-Received: from localhost ([127.0.0.1]:53776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHxRz-0003qT-MX for submit@debbugs.gnu.org; Sun, 01 Dec 2024 22:50:20 -0500 Original-Received: from mail-108-mta226.mxroute.com ([136.175.108.226]:34123) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHxRv-0003n9-DX for 62044@debbugs.gnu.org; Sun, 01 Dec 2024 22:50:18 -0500 Original-Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta226.mxroute.com (ZoneMTA) with ESMTPSA id 193857d70330003e01.001 for <62044@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Mon, 02 Dec 2024 03:50:10 +0000 X-Zone-Loop: 031bc4e0bf1ebd9122e73c5a4ad44eaa01702ac06ab3 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=/vm+V6u8jcr65PjWJ527po1JUy1gKZ7PaIvAo/0U36w=; b=Wy4cIYsHwmtsSceJpPT5bC8oWN jjkpZ/H6tdGeAwwjrVfLz17QMNSwidHSriKdqlWI/h2bf3ZQQS4VFN6rg2pFSKPjYBERZi86Cot9D WsFVDzNVlST1pjyY/pW5Lj1/bEok1lH3wbZghob4c7IROq+OkMacmBrUHbpznwuLu4YX3T/NBFkDD xkkzbnERrxIlTLhC+MAAwhqX4Jih3DGaSBSPybbOm4j8b7aeHMqo6fMtASKqBzr3ycFYKP1WGP3bb nFLOBqqHLCzYF0I45gWf5MTbR6+c0wO2RV0R21LmgRDMMGFMUO0HKGfwT/CROTsZTRLRsDoD5Hjmb Nv4WyoHA==; In-Reply-To: <87wn3rg49m.fsf@gmail.com> (xoddf2's message of "Tue, 07 Mar 2023 22:12:53 -0800") 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:296294 Archived-At: --=-=-= Content-Type: text/plain A stop-gap solution for this issue was introduced in ERC 5.6 as `erc-server-delayed-check-reconnect', a new function value for the option `erc-server-reconnect-function'. There's since been some criticism regarding its lack of discoverability, despite it featuring in the Sample Configuration of ERC's manual. It's therefore been suggested we favor the behavior it enables whenever possible by detecting compatible values of `erc-server-connect-function'. Any false negatives will hopefully only affect advanced users with nonstandard connectors. The following patch tries to implement this. Feedback welcome. Thanks. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-5.6.1-Add-smarter-default-for-erc-server-reconnect-f.patch >From 8383193362db77d814747d9f2074fe514359e76c Mon Sep 17 00:00:00 2001 From: "F. Jason Park" Date: Fri, 29 Nov 2024 15:56:47 -0800 Subject: [PATCH] [5.6.1] Add smarter default for erc-server-reconnect-function * doc/misc/erc.texi (Sample Configuration): Remove customization in `use-package' declaration for `erc-server-reconnect-function' as well as related language in the customization walk-through. Do this because the new default incorporates `erc-server-delayed-check-reconnect'. * etc/ERC-NEWS: Announce new default for `erc-server-reconnect-function'. * lisp/erc/erc-backend.el (erc-server-reconnect-function): Change default to `erc-server-prefer-check-reconnect'. (erc-server-delayed-check-reconnect): Use `process-send-string' instead of `send-string'. (erc-server-known-check-aware-connectors): New variable. (erc-server-prefer-check-reconnect): New function. * test/lisp/erc/erc-scenarios-base-auto-recon.el (erc-scenarios-base-auto-recon-unavailable) (erc-scenarios-base-auto-recon-no-proto): Remove unnecessary `erc-server-reconnect-function' binding because the new default still incorporates the behavior under test that's exhibited by `erc-server-delayed-check-reconnect'. * test/lisp/erc/erc-scenarios-base-buffer-display.el (erc-scenarios-base-buffer-display--reconnect-common): * test/lisp/erc/erc-scenarios-base-compat-rename-bouncer.el (erc-scenarios-common--base-compat-no-rename-bouncer): * test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-base.el (erc-scenarios-base-netid-bouncer--recon-base): * test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-both.el (erc-scenarios-base-netid-bouncer--recon-both): * test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-id.el (erc-scenarios-base-netid-bouncer--reconnect-id-foo) (erc-scenarios-base-netid-bouncer--reconnect-id-bar): * test/lisp/erc/erc-scenarios-base-reconnect.el (erc-scenarios-base-reconnect-timer) (erc-scenarios-base-cancel-reconnect): * test/lisp/erc/erc-scenarios-services-misc.el (erc-scenarios-services-misc--reconnect-retry-nick): * test/lisp/erc/erc-scenarios-stamp.el (erc-scenarios-stamp--date-mode/reconnect): Explicitly bind `erc-server-reconnect-function' to `erc-server-delayed-reconnect', the former default. (Bug#62044) --- doc/misc/erc.texi | 37 ++++++------------- etc/ERC-NEWS | 6 +++ lisp/erc/erc-backend.el | 21 +++++++++-- .../lisp/erc/erc-scenarios-base-auto-recon.el | 8 ++-- .../erc/erc-scenarios-base-buffer-display.el | 1 + ...rc-scenarios-base-compat-rename-bouncer.el | 1 + ...scenarios-base-netid-bouncer-recon-base.el | 3 +- ...scenarios-base-netid-bouncer-recon-both.el | 4 +- ...c-scenarios-base-netid-bouncer-recon-id.el | 6 ++- test/lisp/erc/erc-scenarios-base-reconnect.el | 2 + test/lisp/erc/erc-scenarios-services-misc.el | 1 + test/lisp/erc/erc-scenarios-stamp.el | 1 + 12 files changed, 56 insertions(+), 35 deletions(-) diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi index 0f6b6b8c5be..d7791c04357 100644 --- a/doc/misc/erc.texi +++ b/doc/misc/erc.texi @@ -1340,8 +1340,7 @@ Sample Configuration ;; Scroll all windows to prompt when submitting input. (erc-scrolltobottom-all t) - ;; Reconnect automatically using a fancy strategy. - (erc-server-reconnect-function #'erc-server-delayed-check-reconnect) + ;; Wait a bit longer between automatic reconnect attempts. (erc-server-reconnect-timeout 30) ;; Show new buffers in the current window instead of a split. @@ -1444,30 +1443,18 @@ Sample Configuration finished, hit @kbd{C-x C-s} or click @samp{[Apply and Save]} atop the buffer. -Now do the same for another couple options, this time having to do -with automatic reconnection. But instead of searching for their print -names, try running @kbd{M-x customize-option @key{RET} @samp{