aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-02-27 22:36:26 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-02-27 22:36:26 +0100
commit2143868d8214f07b8f7cb246eda07d9c7cbb73f9 (patch)
tree871e3beff74c17c377758a9066d47552fdd93cd9 /lisp
parentb32c59e32e41e8b94b2df8d65284f0fa508f67cd (diff)
mastodon-switch-to-buffer
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon.el11
1 files changed, 11 insertions, 0 deletions
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)