+;; The next two functions close the message window before searching or
+;; picking but they do so after the user has entered the query (in
+;; case the user was basing the query on something in the message
+;; window).
+
+(defun notmuch-pick-to-search ()
+ "Run \"notmuch search\" with the given `query' and display results."
+ (interactive)
+ (let ((query (notmuch-read-query "Notmuch search: ")))
+ (notmuch-pick-close-message-window)
+ (notmuch-search query)))
+
+(defun notmuch-pick-to-pick ()
+ "Run a query and display results in experimental notmuch-pick mode"
+ (interactive)
+ (let ((query (notmuch-read-query "Notmuch pick: ")))
+ (notmuch-pick-close-message-window)
+ (notmuch-pick query)))
+