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


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tom Tromey <tromey <at> redhat.com>
Cc: 6836 <at> debbugs.gnu.org
Subject: bug#6836: 23.2; ERC -vs- uniquify
Date: Sun, 27 Dec 2015 22:54:21 +0100
Tom Tromey <tromey <at> redhat.com> writes:

> I have uniquify-buffer-name-style set to post-forward-angle-brackets.
>
> In ERC I connect to multiple servers, which sometimes have the same
> channel names.  For example I have two "#gdb" channels I join.
>
> The channel buffers are named #gdb and #gdb<2> -- but I would prefer
> something based on the server name instead.  Ideally, ERC and uniquify
> would work together to achieve this.

I think this was fixed in 2011.  If there's more than one server, the
second one gets called "buf-name/server"...

So I'm closing this bug report.  If this is still a problem in Emacs
25.1, please reopen.

    ;; Reuse existing buffers, but not if the buffer is a connected server
    ;; buffer and not if its associated with a different server than the
    ;; current ERC buffer.
    ;; if buf-name is taken by a different connection (or by something !erc)
    ;; then see if "buf-name/server" meets the same criteria
    (dolist (candidate (list buf-name (concat buf-name "/" server)))
      (if (and (not buffer-name)
               erc-reuse-buffers
               (get-buffer candidate)
               (or target
                   (with-current-buffer (get-buffer candidate)
                     (and (erc-server-buffer-p)
                          (not (erc-server-process-alive)))))
               (with-current-buffer (get-buffer candidate)
                 (and (string= erc-session-server server)
                      (erc-port-equal erc-session-port port))))
          (setq buffer-name candidate)))


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




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.