all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* erc-kill-buffer-stay
@ 2019-02-26 19:13 Emanuel Berg
  2019-02-26 19:38 ` erc-kill-buffer-stay Bob Proulx
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Emanuel Berg @ 2019-02-26 19:13 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: erc-discuss

Is something like this already present in ERC?
If so I didn't find it, and I think it is very
handy. Also feel free to suggest improvements
to the code, as alays.


(defun erc-kill-buffer-stay ()
  "Close the current ERC buffer (i.e., leave the channel)
but stay in ERC."
  (interactive)
  (when (or (not (erc-server-buffer-live-p))
            (= ?y (read-char "press `y' to leave the channel")) )
    (let ((erc-buffers (erc-buffer-list)))
      (if (= 1 (length erc-buffers)) (kill-buffer)
        (cl-loop for b in erc-buffers
                 when (neq b (current-buffer))
                 do (kill-buffer)
                 (switch-to-buffer b)
                 (cl-return) )))))


More ERC stuff:

    http://user.it.uu.se/~embe8573/emacs-init/erc-my.el

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-03-13 20:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-26 19:13 erc-kill-buffer-stay Emanuel Berg
2019-02-26 19:38 ` erc-kill-buffer-stay Bob Proulx
2019-02-27  8:58   ` erc-kill-buffer-stay Emanuel Berg
2019-03-01 16:33   ` erc-kill-buffer-stay Emanuel Berg
2019-02-26 20:43 ` erc-kill-buffer-stay Bad Blue Bull
2019-02-26 20:50   ` erc-kill-buffer-stay Emanuel Berg
2019-02-26 22:31 ` erc-kill-buffer-stay Bad Blue Bull
2019-02-27  8:59   ` erc-kill-buffer-stay Emanuel Berg
2019-03-13 20:33   ` erc-kill-buffer-stay Emanuel Berg

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.