]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: A prefix argument to `notmuch-show' should invert the matching message behaviour.
authorDavid Edmondson <dme@dme.org>
Wed, 8 Feb 2012 08:02:19 +0000 (08:02 +0000)
committerDavid Bremner <bremner@debian.org>
Sun, 12 Feb 2012 16:58:21 +0000 (11:58 -0500)
Allow the user to open a thread with inverted
`notmuch-show-only-matching-messages' behaviour using a prefix
argument.

emacs/notmuch-show.el

index 7ffa1ed1156fb2b78d576a08393d25dbc9d916fc..284e9cd1e8fad1471dc4860fb1131d2473851313 100644 (file)
@@ -1038,8 +1038,11 @@ function is used."
     ;; buffer.
     (setq notmuch-show-process-crypto notmuch-crypto-process-mime)
     ;; Set the default value for
-    ;; `notmuch-show-elide-non-matching-messages' in this buffer.
+    ;; `notmuch-show-elide-non-matching-messages' in this buffer. If
+    ;; there is a prefix argument, invert the default.
     (setq notmuch-show-elide-non-matching-messages notmuch-show-only-matching-messages)
+    (if current-prefix-arg
+       (setq notmuch-show-elide-non-matching-messages (not notmuch-show-elide-non-matching-messages)))
 
     (setq notmuch-show-thread-id thread-id
          notmuch-show-parent-buffer parent-buffer