emacs: Add `notmuch-show-only-matching-messages'.
authorDavid Edmondson <dme@dme.org>
Wed, 8 Feb 2012 08:02:18 +0000 (08:02 +0000)
committerDavid Bremner <bremner@debian.org>
Sun, 12 Feb 2012 16:58:21 +0000 (11:58 -0500)
Allow the user to choose that only matching messages are shown by
default.

emacs/notmuch-show.el

index 0b023a5c75d71130a0f702b9f0302a5b9fca5e9e..7ffa1ed1156fb2b78d576a08393d25dbc9d916fc 100644 (file)
@@ -126,6 +126,11 @@ indentation."
                 (const :tag "View interactively"
                        notmuch-show-interactively-view-part)))
 
+(defcustom notmuch-show-only-matching-messages nil
+  "Only matching messages are shown by default."
+  :type 'boolean
+  :group 'notmuch-show)
+
 (defvar notmuch-show-thread-id nil)
 (make-variable-buffer-local 'notmuch-show-thread-id)
 (put 'notmuch-show-thread-id 'permanent-local t)
@@ -1032,6 +1037,9 @@ function is used."
     ;; Set the default value for `notmuch-show-process-crypto' in this
     ;; buffer.
     (setq notmuch-show-process-crypto notmuch-crypto-process-mime)
+    ;; Set the default value for
+    ;; `notmuch-show-elide-non-matching-messages' in this buffer.
+    (setq notmuch-show-elide-non-matching-messages notmuch-show-only-matching-messages)
 
     (setq notmuch-show-thread-id thread-id
          notmuch-show-parent-buffer parent-buffer