-(defun notmuch-hello-widget-search (widget &rest ignore)
- (cond
- ((eq (widget-get widget :notmuch-search-type) 'tree)
- (notmuch-tree (widget-get widget
- :notmuch-search-terms)))
- ((eq (widget-get widget :notmuch-search-type) 'unthreaded)
- (notmuch-unthreaded (widget-get widget
- :notmuch-search-terms)))
- (t
- (notmuch-search (widget-get widget
- :notmuch-search-terms)
- (widget-get widget
- :notmuch-search-oldest-first)))))
+(defun notmuch-hello-widget-search (widget &rest _ignore)
+ (let ((search-terms (widget-get widget :notmuch-search-terms))
+ (oldest-first (widget-get widget :notmuch-search-oldest-first))
+ (exclude (widget-get widget :notmuch-search-hide-excluded)))
+ (cl-case (widget-get widget :notmuch-search-type)
+ (tree
+ (let ((n (notmuch-search-format-buffer-name (widget-value widget) "tree" t)))
+ (notmuch-tree search-terms nil nil n nil nil nil oldest-first exclude)))
+ (unthreaded
+ (let ((n (notmuch-search-format-buffer-name (widget-value widget)
+ "unthreaded" t)))
+ (notmuch-unthreaded search-terms nil nil n nil oldest-first exclude)))
+ (t
+ (notmuch-search search-terms oldest-first exclude)))))