Re: [PATCH] emacs: notmuch-search: avoid wiping out buffer-local variables
Sean Whitton writes: > --- > emacs/notmuch.el | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) applied to master d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Re: [PATCH] emacs: notmuch-search: avoid wiping out buffer-local variables
On Wednesday, 2020-07-22 at 08:11:32 -07, Sean Whitton wrote: > Reviewed-by: David Edmondson > --- > emacs/notmuch.el | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > 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) > -- > 2.27.0 > ___ > notmuch mailing list -- notmuch@notmuchmail.org > To unsubscribe send an email to notmuch-le...@notmuchmail.org dme. -- Hello? Is anybody home? Well, you don't know me, but I know you. ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
[PATCH] emacs: notmuch-search: avoid wiping out buffer-local variables
--- emacs/notmuch.el | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- 2.27.0 ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org