unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Ken Raeburn <raeburn@redhat.com>
Cc: Philip Kaludercic <philipk@posteo.net>, 45872@debbugs.gnu.org
Subject: bug#45872: 27.1; rcirc nick tracking
Date: Tue, 07 Jun 2022 15:30:47 +0200	[thread overview]
Message-ID: <87mteoha7s.fsf@gnus.org> (raw)
In-Reply-To: <878rt8be9a.fsf@redhat.com> (Ken Raeburn's message of "Thu, 17 Mar 2022 14:55:13 -0400")

Ken Raeburn <raeburn@redhat.com> writes:

> 2022-03-16T08:24:29 !!!
> ":someuser|away!~someuser@some-internal-host.redhat.com NICK
> :someuser" (error Buffer name ‘someuser@some-irc-host.redhat.com’ is
> in use)
>
> I think this is coming from cases where I’ve been offline for a nick
> renaming, so when I come online, “someuser|away” is online but I have a
> buffer “someuser”. Perhaps the UNIQUE argument to rename-buffer should
> be set?

So the suggested change is:

diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 0d30b34922..815dfef50f 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -3298,7 +3298,7 @@ rcirc-handler-NICK
       (with-current-buffer chat-buffer
 	(rcirc-print process sender "NICK" old-nick new-nick)
 	(setq rcirc-target new-nick)
-	(rename-buffer (rcirc-generate-new-buffer-name process new-nick)))
+	(rename-buffer (rcirc-generate-new-buffer-name process new-nick) t))
       (setf rcirc-buffer-alist
             (cons (cons new-nick chat-buffer)
                   (delq (assoc-string old-nick rcirc-buffer-alist t)

Skimming the code, it seems like this should do the trick (but I haven't
tested it).  Ken, Philip, does this look OK to you?

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





  reply	other threads:[~2022-06-07 13:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14 19:42 bug#45872: 27.1; rcirc nick tracking Ken Raeburn
2021-07-23 11:49 ` Lars Ingebrigtsen
2021-07-23 12:02   ` Philip Kaludercic
2021-07-23 18:07     ` Ken Raeburn
2021-07-23 20:33       ` Ken Raeburn
2021-07-24 14:56       ` Philip Kaludercic
2021-07-26 21:46         ` Ken Raeburn
2021-07-27  8:22           ` Philip Kaludercic
2022-03-17 18:55             ` Ken Raeburn
2022-06-07 13:30               ` Lars Ingebrigtsen [this message]
2022-07-05 19:06                 ` Lars Ingebrigtsen

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=87mteoha7s.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=45872@debbugs.gnu.org \
    --cc=philipk@posteo.net \
    --cc=raeburn@redhat.com \
    /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).