]> git.notmuchmail.org Git - notmuch/commitdiff
notmuch.el: patch notmuch-show to call notmuch show without query-context (i.e. witho...
authorDavid Bremner <bremner@unb.ca>
Thu, 10 Dec 2009 15:14:35 +0000 (11:14 -0400)
committerCarl Worth <cworth@cworth.org>
Thu, 10 Dec 2009 18:29:36 +0000 (10:29 -0800)
This fixes the annoying bug of archiving a thread, and then going back
to open it and getting an error.  It needs the notmuch-show API
changing patch of 1259979997-31544-3-git-send-email-david@tethera.net.

notmuch.el

index d180fa4e51ba04f7ed7d9ba4df2a81e0a021f125..fa83d40667b9df818cfd6788591d10a031e61766 100644 (file)
@@ -950,7 +950,9 @@ matching this search term are shown if non-nil. "
       (save-excursion
        (let* ((basic-args (list notmuch-command nil t nil "show" "--entire-thread" thread-id))
                (args (if query-context (append basic-args (list "and (" query-context ")")) basic-args)))
       (save-excursion
        (let* ((basic-args (list notmuch-command nil t nil "show" "--entire-thread" thread-id))
                (args (if query-context (append basic-args (list "and (" query-context ")")) basic-args)))
-         (apply 'call-process args))
+         (apply 'call-process args)
+         (when (and (eq (buffer-size) 0) query-context)
+           (apply 'call-process basic-args)))
        (notmuch-show-markup-messages)
        )
       (run-hooks 'notmuch-show-hook)
        (notmuch-show-markup-messages)
        )
       (run-hooks 'notmuch-show-hook)