GNU bug report logs - #12002
24.1.50; ERC nick change trouble

Previous Next

Package: emacs;

Reported by: Antoine Levitt <antoine.levitt <at> gmail.com>

Date: Fri, 20 Jul 2012 23:03:02 UTC

Severity: normal

Tags: patch

Merged with 6016, 6502

Found in versions 23.1, 24.1.50

Fixed in version 24.3

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Antoine Levitt <antoine.levitt <at> gmail.com>
Subject: bug#12002: closed (Re: bug#12002: 24.1.50; ERC nick change trouble)
Date: Sun, 07 Oct 2012 01:30:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#12002: 24.1.50; ERC nick change trouble

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 12002 <at> debbugs.gnu.org.

-- 
12002: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12002
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: 12002-done <at> debbugs.gnu.org
Subject: Re: bug#12002: 24.1.50; ERC nick change trouble
Date: Sat, 06 Oct 2012 21:29:22 -0400
Version: 24.3

Thanks. I installed a simpler change (below). Please let me know if it
is not ok, since I don't use erc.

*** lisp/erc/erc-backend.el	2012-10-06 01:04:53 +0000
--- lisp/erc/erc-backend.el	2012-10-07 01:25:39 +0000
***************
*** 1316,1322 ****
           (when (equal (erc-default-target) nick)
             (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)
--- 1316,1322 ----
           (when (equal (erc-default-target) nick)
             (setq erc-default-recipients
                   (cons nn (cdr erc-default-recipients)))
!            (rename-buffer nn t)         ; bug#12002
             (erc-update-mode-line)
             (add-to-list 'bufs (current-buffer)))))
        (erc-update-user-nick nick nn host nil nil login)


[Message part 3 (message/rfc822, inline)]
From: Antoine Levitt <antoine.levitt <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.1.50; ERC nick change trouble
Date: Sat, 21 Jul 2012 00:56:25 +0200
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



This bug report was last modified 12 years and 231 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.