X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-hello.el;h=cbe414f1e9a0d111fac4aba2b215845a34ae2ed2;hb=9b85872ed4526688a6195cfa8af19be20ed869c2;hp=bbeb5de0c8c7d7d164af31477457b2fdcf1465f9;hpb=f1f7e71e0347672e0658362c513e49c05b0f4161;p=notmuch diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index bbeb5de0..cbe414f1 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -142,6 +142,9 @@ diagonal." notmuch-search-oldest-first nil nil #'notmuch-hello-search-continuation)) +(defun notmuch-saved-search-count (search) + (car (process-lines notmuch-command "count" search))) + (defun notmuch-hello-insert-tags (tag-alist widest target) (let* ((tags-per-line (max 1 (/ (- (window-width) notmuch-hello-indent) @@ -160,7 +163,7 @@ diagonal." do (progn ;; (not elem) indicates an empty slot in the matrix. (when elem - (widget-insert (format "%6s " (notmuch-folder-count (cdr elem)))) + (widget-insert (format "%6s " (notmuch-saved-search-count (cdr elem)))) (if (string= (format "%s " (car elem)) target) (setq found-target-pos (point-marker))) (widget-create 'push-button @@ -268,7 +271,7 @@ diagonal." (if notmuch-show-empty-saved-searches notmuch-saved-searches (loop for elem in notmuch-saved-searches - if (> (string-to-number (notmuch-folder-count (cdr elem))) 0) + if (> (string-to-number (notmuch-saved-search-count (cdr elem))) 0) collect elem))) (saved-widest (notmuch-hello-longest-label saved-alist)) (alltags-alist (mapcar '(lambda (tag) (cons tag (concat "tag:" tag))) @@ -396,6 +399,12 @@ diagonal." (if (not (widget-at)) (widget-forward 1))))) +;;;###autoload +(defun notmuch-folder () + "Deprecated function for invoking notmuch---calling `notmuch' is preferred now." + (interactive) + (notmuch-hello)) + ;; (provide 'notmuch-hello)