unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Vivek Dasmohapatra <vivek@etla.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>, 4048@debbugs.gnu.org
Subject: bug#4048: 23.1; erc-server-reconnect-attempts does not work
Date: Sun, 27 Dec 2015 23:37:21 +0100	[thread overview]
Message-ID: <878u4f4ixq.fsf@gnus.org> (raw)
In-Reply-To: <alpine.DEB.2.00.1002110112020.17999@octopus.pepperfish.net> (Vivek Dasmohapatra's message of "Thu, 11 Feb 2010 01:17:05 +0000 (GMT)")

Vivek Dasmohapatra <vivek@etla.org> writes:

> 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. ]

IThis patch no longer applies:

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

Is this still a problem in erc in Emacs 25?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  parent reply	other threads:[~2015-12-27 22:37 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
2010-02-13 10:44               ` Andreas Schwab
2011-03-03 21:16                 ` Glenn Morris
2015-12-27 22:37               ` Lars Ingebrigtsen [this message]
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878u4f4ixq.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=4048@debbugs.gnu.org \
    --cc=schwab@linux-m68k.org \
    --cc=vivek@etla.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).