Move decision about sort order from the notify handler to the widget
setup. This keeps the handler simple when more fancy stuff is added.
---
 emacs/notmuch-hello.el |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 052aaeb..532f06d 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -311,9 +311,8 @@ diagonal."
          append (notmuch-hello-reflect-generate-row ncols nrows row list))))

 (defun notmuch-hello-widget-search (widget &rest ignore)
-  (notmuch-search (widget-get widget
-                             :notmuch-search-terms)
-                 notmuch-search-oldest-first
+  (notmuch-search (widget-get widget :notmuch-search-terms)
+                 (widget-get widget :notmuch-search-oldest-first)
                  nil nil #'notmuch-hello-search-continuation))

 (defun notmuch-saved-search-count (search)
@@ -434,6 +433,7 @@ Such a list can be computed with 
`notmuch-hello-query-counts'."
                (widget-create 'push-button
                               :notify #'notmuch-hello-widget-search
                               :notmuch-search-terms query
+                              :notmuch-search-oldest-first 
notmuch-search-oldest-first
                               name)
                (setq column-indent
                      (1+ (max 0 (- column-width (length name)))))))
-- 
1.7.2.5

Reply via email to