Subject: Re: bug#32285: 26.1;

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 23 Oct 2019 11:09:24 +0200

Emacs Watcher <[email-masked]> writes:

> You should notice that the 'freenode' buffer has been reused and that the
> original session cannot be reached. My guess is that this is an original ERC
> design limitation, but it probably ought to be addressed. 

It looks like it does this on purpose: It a server buffer exists, and
it's connected to the server you're using, then it's reused:

    ;; 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
               (or (not (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)))

If you don't want this, then erc-reuse-buffers should be set to nil,
apparently.

So this doesn't seem to be a bug, and I'm closing this bug report.  

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