fix problem with notmuch-hello-nice-number

Subject: fix problem with notmuch-hello-nice-number

Date: Wed, 09 Jun 2010 07:49:01 -0700

To: notmuch

Cc:

From: Dirk Hohndel


Without this little patch notmuch fails with current git if there's a
saved search that has zero results

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index f5d061b..7c32f7c 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -112,6 +112,8 @@ Typically \",\" in the US and UK and \".\" in Europe."
 
 (defun notmuch-hello-nice-number (n)
   (let (result)
+    (if (= n 0)
+       (push 0 result))
     (while (> n 0)
       (push (% n 1000) result)
       (setq n (/ n 1000)))

-- 
Dirk Hohndel
Intel Open Source Technology Center

Thread: