emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ERC: [PATCH] use network name for server buffer name


From: Kelvin White
Subject: ERC: [PATCH] use network name for server buffer name
Date: Thu, 24 Jul 2014 08:35:04 -0400
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/24.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

This change mainly affects users that may connect to the same server
multiple times for multiple networks. e.g. bouncers like ZNC or proxy
users. In these cases a user will have multiple server-buffers with
the same name (i.e. irc.example.net:6697, irc.example.net:6697<2> etc.)
This patch will rename the server-buffer to whatever the network name
is, if available. Otherwise, the hostname:port will be used as normal.

=== modified file 'lisp/erc/erc.el'
--- lisp/erc/erc.el     2014-07-08 19:45:24 +0000
+++ lisp/erc/erc.el     2014-07-24 12:25:24 +0000
@@ -6233,7 +6233,9 @@
     (cond ((erc-default-target)
            (concat (erc-string-no-properties (erc-default-target))
                    "@" network-name))
-          (network-name network-name)
+          (network-name
+           (rename-buffer network-name)
+           network-name)
           (t (buffer-name (current-buffer))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]