Re: [PATCH v2] emacs: Improved compatibility for window-body-width in Emacs < 24
[notmuch-archives.git] / 60 / 477784896e36188ce73f31806f57c4130d5ec9
1 Return-Path: <BATV+aab109f24164d34583d5+2481+infradead.org+hohndel@bombadil.srs.infradead.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id A46454196F0\r
6         for <notmuch@notmuchmail.org>; Wed,  9 Jun 2010 10:49:06 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.301\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.301 tagged_above=-999 required=5\r
12         tests=[BAYES_40=-0.001, RCVD_IN_DNSWL_MED=-2.3] autolearn=ham\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id M0rjKPubnydG for <notmuch@notmuchmail.org>;\r
16         Wed,  9 Jun 2010 10:48:52 -0700 (PDT)\r
17 Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 2DACC431FC1\r
19         for <notmuch@notmuchmail.org>; Wed,  9 Jun 2010 10:48:52 -0700 (PDT)\r
20 Received: from localhost ([::1] helo=x201s.gr8dns.org)\r
21         by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux))\r
22         id 1OMPOQ-0001Ur-Oi\r
23         for notmuch@notmuchmail.org; Wed, 09 Jun 2010 17:48:50 +0000\r
24 Received: by x201s.gr8dns.org (Postfix, from userid 500)\r
25         id BB60B23D4BC; Wed,  9 Jun 2010 07:49:01 -0700 (PDT)\r
26 From: Dirk Hohndel <hohndel@infradead.org>\r
27 To: notmuch <notmuch@notmuchmail.org>\r
28 Subject: fix problem with notmuch-hello-nice-number\r
29 User-Agent: Notmuch/0.3.1-58-g6607fd6 (http://notmuchmail.org) Emacs/23.2.1\r
30         (x86_64-redhat-linux-gnu)\r
31 Date: Wed, 09 Jun 2010 07:49:01 -0700\r
32 Message-ID: <m37hm8fehu.fsf@x201s.gr8dns.org>\r
33 MIME-Version: 1.0\r
34 Content-Type: text/plain; charset=us-ascii\r
35 X-SRS-Rewrite: SMTP reverse-path rewritten from <hohndel@infradead.org> by\r
36         bombadil.infradead.org See http://www.infradead.org/rpr.html\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Wed, 09 Jun 2010 17:49:06 -0000\r
50 \r
51 \r
52 Without this little patch notmuch fails with current git if there's a\r
53 saved search that has zero results\r
54 \r
55 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
56 index f5d061b..7c32f7c 100644\r
57 --- a/emacs/notmuch-hello.el\r
58 +++ b/emacs/notmuch-hello.el\r
59 @@ -112,6 +112,8 @@ Typically \",\" in the US and UK and \".\" in Europe."\r
60  \r
61  (defun notmuch-hello-nice-number (n)\r
62    (let (result)\r
63 +    (if (= n 0)\r
64 +       (push 0 result))\r
65      (while (> n 0)\r
66        (push (% n 1000) result)\r
67        (setq n (/ n 1000)))\r
68 \r
69 -- \r
70 Dirk Hohndel\r
71 Intel Open Source Technology Center\r