diff options
| author | Sean Whitton <spwhitton@spwhitton.name> | 2020-08-11 09:59:13 -0700 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2020-08-22 09:11:06 -0300 |
| commit | 88ae4f02511c4dd61ea90b28794f469819d543be (patch) | |
| tree | 28d48aa7eca3525ca103619e8fd19bd90e42c554 /emacs/notmuch.el | |
| parent | d7732b2b6aa0a62262061b3b330221d2fdf772e0 (diff) | |
emacs: Use pop-to-buffer-same-window rather than switch-to-buffer
This means that notmuch commands obey display-buffer-alist so the user
can customize how buffers show up.
It also permits the use of C-x 4 4, C-x 5 5 and C-x t t, available in
Emacs 28. For example, one can use C-x 4 4 M-x notmuch-jump-search RET
to open a saved search in another window rather than the current window.
Or in notmuch-search mode, C-x 5 5 RET to view the message at point in
a new frame.
notmuch-tree has custom buffer display logic, so bind
display-buffer-overriding-action to make pop-to-buffer-same-window
behave exactly as switch-to-buffer while that function is running.
Diffstat (limited to 'emacs/notmuch.el')
| -rw-r--r-- | emacs/notmuch.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 8132cea6..193a1255 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -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 |
