From: Vivek Dasmohapatra <vivek@etla.org>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: 4048@debbugs.gnu.org
Subject: bug#4048: 23.1; erc-server-reconnect-attempts does not work
Date: Thu, 11 Feb 2010 01:17:05 +0000 (GMT) [thread overview]
Message-ID: <alpine.DEB.2.00.1002110112020.17999@octopus.pepperfish.net> (raw)
In-Reply-To: <m31vgt2mdm.fsf@hase.home>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 537 bytes --]
Tags: patch
Does this patch make the problem go away? It seems to work here.
The problem was that erc-mode was killing all local variables, even when
the mode was already erc-mode : The patch makes it preserve the
reconnection count in that case, which seems to have the desired effect
without adversely affecting anything else.
[ Stomping on the route didn't work for me as the existing connection was
grandfathered in by the kernel: Installing a local ircd and shutting it
down behind the client's back worked nicely though. ]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: TEXT/x-diff; name=0001-Preserve-the-reconnection-count-when-reinitialising-.patch, Size: 572 bytes --]
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1445,7 +1445,10 @@ Special commands:
\\{erc-mode-map}
Turning on `erc-mode' runs the hook `erc-mode-hook'."
- (kill-all-local-variables)
+ (let ((recon-count erc-server-reconnect-count) (old-mode major-mode))
+ (kill-all-local-variables)
+ (if (and (eq old-mode 'erc-mode) (integerp recon-count) (< 0 recon-count))
+ (setq erc-server-reconnect-count recon-count)))
(use-local-map erc-mode-map)
(setq mode-name "ERC"
major-mode 'erc-mode
next prev parent reply other threads:[~2010-02-11 1:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-05 15:16 bug#4048: 23.1; erc-server-reconnect-attempts does not work Andreas Schwab
2010-02-10 2:29 ` Vivek Dasmohapatra
2010-02-10 10:26 ` Andreas Schwab
2010-02-10 13:06 ` Vivek Dasmohapatra
2010-02-10 13:49 ` Andreas Schwab
2010-02-10 14:19 ` Vivek Dasmohapatra
2010-02-10 14:28 ` Andreas Schwab
2010-02-10 14:31 ` Andreas Schwab
2010-02-11 1:17 ` Vivek Dasmohapatra [this message]
2010-02-13 10:44 ` Andreas Schwab
2011-03-03 21:16 ` Glenn Morris
2015-12-27 22:37 ` Lars Ingebrigtsen
2016-02-04 7:11 ` Lars Ingebrigtsen
2016-02-04 15:41 ` Vivek Dasmohapatra
-- strict thread matches above, loose matches on Subject: below --
2009-08-09 23:42 Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.00.1002110112020.17999@octopus.pepperfish.net \
--to=vivek@etla.org \
--cc=4048@debbugs.gnu.org \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.