From: F. Jason Park Date: Fri, 29 Nov 2024 23:56:47 +0000 (-0800) Subject: Use smarter default for erc-server-reconnect-function X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d54b2f7f18e485cf780b38ac712fe68ab5a90b27;p=emacs.git Use 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' behavior for compatible connect functions. * 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-delayed-check-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 incorporates the behavior being tested for. * 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, which does not do any probing. (Bug#62044) (cherry picked from commit 1c960bda91237c92f9f602bcb8538ad500c0bc49) --- diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi index a3802c8c6bf..aa62c1b3274 100644 --- a/doc/misc/erc.texi +++ b/doc/misc/erc.texi @@ -1340,8 +1340,7 @@ settings (@pxref{Sample configuration via Customize}). ;; 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 @@ descriptions just in case you want to disable them later. When 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{