From 2143868d8214f07b8f7cb246eda07d9c7cbb73f9 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 27 Feb 2023 22:36:26 +0100 Subject: mastodon-switch-to-buffer --- lisp/mastodon.el | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lisp') diff --git a/lisp/mastodon.el b/lisp/mastodon.el index 9cf19b2..a49d0cc 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -368,6 +368,17 @@ Calls `mastodon-tl--get-buffer-type', which see." (cl-loop for x in mastodon-buffers do (kill-buffer x)))) +(defun mastodon-switch-to-buffer () + "Switch to a live mastodon buffer." + (interactive) + (let* ((bufs (mastodon-live-buffers)) + (buf-names (mapcar (lambda (buf) + (buffer-name buf)) + bufs)) + (choice (completing-read "Switch to mastodon buffer: " + buf-names))) + (switch-to-buffer choice))) + ;;;###autoload (add-hook 'mastodon-mode-hook (lambda () (when (require 'emojify nil :noerror) -- cgit v1.2.3