branch: elpa/fedi
commit 2ae4384ab699a3f8bd3eeb40083406376fe79bec
Author: marty hiatt <[email protected]>
Commit: marty hiatt <[email protected]>
comment or switch out calls to `switch-to-buffer`
---
fedi-http.el | 2 +-
fedi-post.el | 2 +-
fedi.el | 4 +++-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/fedi-http.el b/fedi-http.el
index 5b82eaba0ba..08d3d2c1d1c 100644
--- a/fedi-http.el
+++ b/fedi-http.el
@@ -248,7 +248,7 @@ Callback to `fedi-http--get-response-async'."
(defun fedi-http--process-headers ()
"Return an alist of http response headers."
- (switch-to-buffer (current-buffer))
+ ;; (switch-to-buffer (current-buffer))
(goto-char (point-min))
(let* ((head-str (buffer-substring-no-properties
(point-min)
diff --git a/fedi-post.el b/fedi-post.el
index f5e24293632..26e3c62f6f2 100644
--- a/fedi-post.el
+++ b/fedi-post.el
@@ -452,7 +452,7 @@ FIELDS is a list of alists of fields to add, using
`fedi-post--concat-fields'."
;; URLs always = 23, and domain names of handles are not counted.
;; This is how mastodon does it."
(with-temp-buffer
- (switch-to-buffer (current-buffer))
+ ;; (switch-to-buffer (current-buffer))
(insert post-string)
(goto-char (point-min))
(length (buffer-substring (point-min) (point-max)))))
diff --git a/fedi.el b/fedi.el
index 32393de2e49..0f4151b82bc 100644
--- a/fedi.el
+++ b/fedi.el
@@ -178,7 +178,8 @@ than `switch-to-buffer'."
(funcall ,mode-fun)
(if ,other-window
(switch-to-buffer-other-window ,buffer)
- (switch-to-buffer ,buffer))
+ ;; (switch-to-buffer ,buffer))
+ (pop-to-buffer ,buffer '(display-buffer-same-window)))
,@body
(goto-char (point-min)))))
@@ -568,6 +569,7 @@ TIME-STAMP is assumed to be in the past."
(defun fedi-switch-to-buffer (prefix)
"Switch to a live fedi buffer."
+ (interactive)
(let* ((bufs (fedi-live-buffers prefix))
(buf-names (mapcar #'buffer-name bufs))
(choice (completing-read "Switch to buffer: "