From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Antoine Levitt Newsgroups: gmane.emacs.bugs Subject: bug#12002: 24.1.50; ERC nick change trouble Date: Sat, 21 Jul 2012 00:56:25 +0200 Message-ID: <87sjcmkpnq.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1342825015 22422 80.91.229.3 (20 Jul 2012 22:56:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 20 Jul 2012 22:56:55 +0000 (UTC) To: 12002@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 21 00:56:55 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 1SsM7s-00035T-La for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Jul 2012 00:56:48 +0200 Original-Received: from localhost ([::1]:49052 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsM7s-0003dJ-3b for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Jul 2012 18:56:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsM7p-0003d9-2K for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2012 18:56:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SsM7n-0006VT-Up for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2012 18:56:44 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43644) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsM7n-0006VO-RN for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2012 18:56:43 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SsMDu-00026P-NE for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2012 19:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Antoine Levitt Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Jul 2012 23:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12002 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.13428253748066 (code B ref -1); Fri, 20 Jul 2012 23:03:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Jul 2012 23:02:54 +0000 Original-Received: from localhost ([127.0.0.1]:53190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SsMDl-000262-LX for submit@debbugs.gnu.org; Fri, 20 Jul 2012 19:02:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51914) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SsMDj-00025s-13 for submit@debbugs.gnu.org; Fri, 20 Jul 2012 19:02:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SsM7a-0006U8-Oo for submit@debbugs.gnu.org; Fri, 20 Jul 2012 18:56:31 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:58627) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsM7a-0006U4-Ji for submit@debbugs.gnu.org; Fri, 20 Jul 2012 18:56:30 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsM7Z-0003d2-Or for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2012 18:56:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SsM7Y-0006Tl-KS for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2012 18:56:29 -0400 Original-Received: from mail-wg0-f49.google.com ([74.125.82.49]:42297) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsM7Y-0006Tg-E7 for bug-gnu-emacs@gnu.org; Fri, 20 Jul 2012 18:56:28 -0400 Original-Received: by wgbez12 with SMTP id ez12so3199784wgb.30 for ; Fri, 20 Jul 2012 15:56:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=BmjpQuzS6aDksik7xqHSHR5VYQO5HN+I8TYHD5rfqrc=; b=BnHPgVDKbKn/pJ6kIxiomFFildavU2Aka6kaU9+NOIQQWdUPDeABoFtxms7ROwRTNh 1aYFbu8UlfuBCXhNOzgyNDmI/ZKHDaJHitzQTdllZWq8n+F14dT2fWIyw/abhT4Y5O9s G4XDIFytHh6i5mv96+oAEMworehI6cwGSYs3xSURPNdo9nFmayi+HEsJBPcbOOaC6Y0+ zhq4HtO64yZDILN6CdJkNff+WnGqKm/pxvwUcL2kBIWLRzcRg7b52eAXtwFH/ZMxwLIb KCQdiwd7f8xzkDH+U5l1tJSt99pvmkxyMJ9udXnaFf1cFzA+YMtNHUJbU90RG0ZRFvvE 4E2w== Original-Received: by 10.217.5.130 with SMTP id w2mr29352wes.45.1342824986923; Fri, 20 Jul 2012 15:56:26 -0700 (PDT) Original-Received: from lambda (ney92-7-78-233-218-202.fbx.proxad.net. [78.233.218.202]) by mx.google.com with ESMTPS id y5sm254938wiw.9.2012.07.20.15.56.26 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 Jul 2012 15:56:26 -0700 (PDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) 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:62209 Archived-At: Hi, There's a bug in ERC nick change handling. Imagine you have a query with john, who has a timeout. He then comes back as john-, and queries you. Then, when his old timeout goes away, he changes nick back to john. The ERC response handler then tries to change the john- query buffer name to john, which clashes with the old buffer. Since there was an error in the execution flow, everything is messed up. Here's a patch that doesn't try to change the name back when a buffer of the same name exists. It still notifies the old query buffer of the name change though. I haven't tested it but it should be fine. (I think ...) I'm not holding my breath on this, because of the lack of activity of ERC maintainers. Still, at least the patch is out there. diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index cce24e6..115c31f 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -1313,10 +1313,11 @@ add things to `%s' instead." (erc-buffer-filter (lambda () (when (equal (erc-default-target) nick) - (setq erc-default-recipients - (cons nn (cdr erc-default-recipients))) - (rename-buffer nn) - (erc-update-mode-line) + (unless (get-buffer nn) + (setq erc-default-recipients + (cons nn (cdr erc-default-recipients))) + (rename-buffer nn) + (erc-update-mode-line)) (add-to-list 'bufs (current-buffer))))) (erc-update-user-nick nick nn host nil nil login) (cond