]> git.cworth.org Git - notmuch/blobdiff - emacs/notmuch.el
emacs: Use pop-to-buffer-same-window rather than switch-to-buffer
[notmuch] / emacs / notmuch.el
index babddbb6fef87652ed7204fb4dc65351d12f72b1..193a1255dda2c0ce040f519170d6b9356dcd58e9 100644 (file)
@@ -545,7 +545,7 @@ thread."
                notmuch-search-query-string
                nil
                (notmuch-prettify-subject (notmuch-search-find-subject))
-               t))
+               t nil (current-buffer)))
 
 (defun notmuch-search-reply-to-thread (&optional prompt-for-sender)
   "Begin composing a reply-all to the entire current thread in a new buffer."
@@ -994,7 +994,7 @@ the configured default sort order."
         (buffer (get-buffer-create (notmuch-search-buffer-title query))))
     (if no-display
        (set-buffer buffer)
-      (switch-to-buffer buffer))
+      (pop-to-buffer-same-window buffer))
     ;; avoid wiping out third party buffer-local variables in the case
     ;; where we're just refreshing or changing the sort order of an
     ;; existing search results buffer
@@ -1134,7 +1134,7 @@ notmuch buffers exist, run `notmuch'."
        ;; If the first one we found is any other than the starting
        ;; buffer, switch to it.
        (unless (eq first start)
-         (switch-to-buffer first))
+         (pop-to-buffer-same-window first))
       (notmuch))))
 
 ;;;; Imenu Support