GNU bug report logs - #6836
23.2; ERC -vs- uniquify

Previous Next

Package: emacs;

Reported by: Tom Tromey <tromey <at> redhat.com>

Date: Tue, 10 Aug 2010 15:41:02 UTC

Severity: wishlist

Tags: fixed

Found in version 23.2

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 6836 <at> debbugs.gnu.org (full text, mbox):

From: Binjo <binjo.cn <at> gmail.com>
To: "Tom Tromey" <tromey <at> redhat.com>, 6836 <at> debbugs.gnu.org
Subject: bug #6836 23.2; ERC -vs- uniquify
Date: Thu, 12 Apr 2012 16:18:43 +0800
hi, Tom

I had the same need of uniquifing the same channel name with different irc
servers, and found your bug report. It seems not easy to integrate such feature
into uniquify.el, so here is my workaround, in case you need it, for such a long
time passed. ;)

--8<---------------cut here---------------start------------->8---
(defadvice erc-generate-new-buffer-name (after binjo-ad-rename-buffer-uniquify activate)
  "Uniquify erc buffer names with parts of server name."
  (let* ((server (ad-get-arg 0))
         (target (ad-get-arg 2))
         (server-name (nth 1 (reverse (split-string server "\\.")))))
    (if (string-match ">$" ad-return-value)
        (setq ad-return-value (concat target ":" server-name)))))
--8<---------------cut here---------------end--------------->8---

-- 
Life is like a prison, can you break it?




This bug report was last modified 9 years and 152 days ago.

Previous Next


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