summaryrefslogtreecommitdiffstats
path: root/emacs
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-07-22 08:11:32 -0700
committerDavid Bremner <david@tethera.net>2020-07-22 19:48:24 -0300
commitf9fbd1ee3bfd679175d88af403752d87a730349f (patch)
treeb40686e08ce4530c69c2c8867ef0a5dcef423ed9 /emacs
parent765ca7bc08f83a3c0f9ebffe58dab03634e45f37 (diff)
emacs: notmuch-search: avoid wiping out buffer-local variables
Diffstat (limited to 'emacs')
-rw-r--r--emacs/notmuch.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index dd18f2e1..c97997fe 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -987,7 +987,11 @@ the configured default sort order."
(if no-display
(set-buffer buffer)
(switch-to-buffer buffer))
- (notmuch-search-mode)
+ ;; 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
+ (unless (eq major-mode 'notmuch-search-mode)
+ (notmuch-search-mode))
;; Don't track undo information for this buffer
(set 'buffer-undo-list t)
(set 'notmuch-search-query-string query)