From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Deniz Dogan Newsgroups: gmane.emacs.bugs Subject: bug#10947: 24.0.92; The variable `erc-channel-users' can be invalid after reconnection Date: Mon, 05 Mar 2012 17:31:35 +0100 Message-ID: <86boob102g.fsf@dogan.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1330965247 26446 80.91.229.3 (5 Mar 2012 16:34:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 5 Mar 2012 16:34:07 +0000 (UTC) To: 10947@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 05 17:34:06 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S4arI-0007vT-Nl for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Mar 2012 17:34:00 +0100 Original-Received: from localhost ([::1]:45893 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4arI-0003L4-31 for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Mar 2012 11:34:00 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:46903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4ar9-0003E4-G2 for bug-gnu-emacs@gnu.org; Mon, 05 Mar 2012 11:33:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4ar2-0002yZ-QT for bug-gnu-emacs@gnu.org; Mon, 05 Mar 2012 11:33:51 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4ar2-0002yS-Mr for bug-gnu-emacs@gnu.org; Mon, 05 Mar 2012 11:33:44 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S4arK-0005UG-3f for bug-gnu-emacs@gnu.org; Mon, 05 Mar 2012 11:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Deniz Dogan Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Mar 2012 16:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10947 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.133096522621066 (code B ref -1); Mon, 05 Mar 2012 16:34:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Mar 2012 16:33:46 +0000 Original-Received: from localhost ([127.0.0.1]:34333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S4ar3-0005TZ-AT for submit@debbugs.gnu.org; Mon, 05 Mar 2012 11:33:46 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:60216) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S4aqp-0005TB-F9 for submit@debbugs.gnu.org; Mon, 05 Mar 2012 11:33:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4apw-0002m2-HU for submit@debbugs.gnu.org; Mon, 05 Mar 2012 11:32:42 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:40218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4apw-0002ly-EB for submit@debbugs.gnu.org; Mon, 05 Mar 2012 11:32:36 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4app-0002cC-K4 for bug-gnu-emacs@gnu.org; Mon, 05 Mar 2012 11:32:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4api-0002k9-6Q for bug-gnu-emacs@gnu.org; Mon, 05 Mar 2012 11:32:29 -0500 Original-Received: from ch-smtp05.sth.basefarm.net ([80.76.153.6]:41218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4aph-0002jf-Rz for bug-gnu-emacs@gnu.org; Mon, 05 Mar 2012 11:32:22 -0500 Original-Received: from c80-216-107-103.bredband.comhem.se ([80.216.107.103]:57144 helo=EKATERINA) by ch-smtp05.sth.basefarm.net with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1S4ap6-00089H-It for bug-gnu-emacs@gnu.org; Mon, 05 Mar 2012 17:31:51 +0100 X-Originating-IP: 80.216.107.103 X-Scan-Result: No virus found in message 1S4ap6-00089H-It. X-Scan-Signature: ch-smtp05.sth.basefarm.net 1S4ap6-00089H-It 6bc4cb0615b1522e9b54d04fba8e5179 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:57509 Archived-At: --=-=-= Content-Type: text/plain I noticed this when I disconnected the Internet cable from my machine and then plugged it back in a while later to reconnect. When I hit C-c C-n to list the users, a bot of mine was listed among the users. I did /whois the_nickname and got "No such nick/channel". After some investigation, I found that ERC doesn't clear erc-channel-users when an unexpected disconnection occurs. I've attached a patch which addresses this problem. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=erc-channel-users.patch Content-Description: Patch to clear erc-channel-users upon disconnection === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2012-02-09 07:48:22 +0000 +++ lisp/erc/ChangeLog 2012-03-05 16:26:23 +0000 @@ -1,3 +1,9 @@ +2012-03-05 Deniz Dogan + + * erc-backend.el (erc-process-sentinel): Clear channel user lists + upon disconnection. This prevents invalid channel user lists when + reconnecting. + 2012-02-08 Glenn Morris * erc-backend.el (erc-coding-system-precedence): @@ -277,4 +283,3 @@ ;; coding: utf-8 ;; add-log-time-zone-rule: t ;; End: - === modified file 'lisp/erc/erc-backend.el' --- lisp/erc/erc-backend.el 2012-02-08 08:07:24 +0000 +++ lisp/erc/erc-backend.el 2012-03-02 15:22:22 +0000 @@ -680,6 +680,9 @@ (setq erc-server-ping-handler nil))) (run-hook-with-args 'erc-disconnected-hook (erc-current-nick) (system-name) "") + (dolist (buf (erc-buffer-filter (lambda () (boundp 'erc-channel-users)) cproc)) + (with-current-buffer buf + (setq erc-channel-users (make-hash-table :test 'equal)))) ;; Remove the prompt (goto-char (or (marker-position erc-input-marker) (point-max))) (forward-line 0) --=-=-= Content-Type: text/plain In GNU Emacs 24.0.92.1 (i386-mingw-nt6.1.7601) of 2012-01-17 on MARVIN Windowing system distributor `Microsoft Corp.', version 6.1.7601 configured using `configure --with-gcc (4.6) --no-opt --cflags -ID:/devel/emacs/libs/libXpm-3.5.8/include -ID:/devel/emacs/libs/libXpm-3.5.8/src -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include -ID:/devel/emacs/libs/giflib-4.1.4-1/include -ID:/devel/emacs/libs/jpeg-6b-4/include -ID:/devel/emacs/libs/tiff-3.8.2-1/include -ID:/devel/emacs/libs/gnutls-3.0.9/include --ldflags -LD:/devel/emacs/libs/gnutls-3.0.9/lib' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: SVE value of $XMODIFIERS: nil locale-coding-system: cp1252 default enable-multibyte-characters: t Major mode: Help Minor modes in effect: diff-auto-refine-mode: t erc-truncate-mode: t erc-services-mode: t erc-ring-mode: t erc-networks-mode: t erc-netsplit-mode: t erc-menu-mode: t erc-list-mode: t erc-pcomplete-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-autojoin-mode: t popcmp-group-alternatives: t popcmp-short-help-beside-alts: t erc-track-mode: t erc-track-minor-mode: t erc-match-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t erc-scrolltobottom-mode: t electric-indent-mode: t nxhtml-menu-mode: t rcirc-track-minor-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Wrote d:/repos/emacs/trunk/lisp/erc/ChangeLog Finding changes in d:/repos/emacs/trunk/lisp/erc/...done Mark set [2 times] Quit Saving file d:/erc-channel-users.patch... Wrote d:/erc-channel-users.patch Quit Making completion list... Type "q" in help window to restore its previous buffer. Mark activated Load-path shadows: d:/repos/nxhtml/related/django hides ~/.emacs.d/django d:/repos/nima/json hides c:/misc/emacs/lisp/json d:/repos/nxhtml/util/org-odt hides c:/misc/emacs/lisp/org/org-odt Features: (shadow sort mail-extr message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader emacsbug smerge-mode newcomment whitespace vc-sccs vc-svn vc-cvs vc-rcs vc-dir ewoc vc ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult ediff-init ediff vc-dispatcher magit diff-mode log-edit pcvs-util add-log magit-key-mode dired-aux apropos debug help-mode view multi-isearch browse-url iswitchb vc-git network-stream auth-source eieio byte-opt bytecomp byte-compile cconv macroexp assoc gnus-util mm-util mail-prsvr password-cache starttls tls magit-autoloads package tabulated-list uniquify erc-truncate erc-services erc-ring erc-networks erc-netsplit erc-menu erc-pcomplete pcomplete comint erc-button erc-fill erc-stamp wid-edit erc-join nathalie-theme popcmp erc-track erc-match erc-goodies erc erc-backend erc-compat format-spec thingatpt pp electric cus-start cus-load flymake-files advice help-fns advice-preload flymakemsg nxhtml-autostart nxhtml-autoload majmodpri vc-bzr nxhtml-menu web-autoload nxhtml-base dired-x easymenu dired regexp-opt filmtipset sgml-mode helo derived nginx-mode notepad rcirc easy-mmode edmacro kmacro cl ring ido time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 disp-table ls-lisp w32-win w32-vars tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process multi-tty emacs) --=-=-=--