Re: [PATCH] doc: Allow rst2man.py as an alternative to rst2man
[notmuch-archives.git] / 39 / dc2392fc2e55152e3c554b3ec457f863b42a6f
1 Return-Path: <prvs=505a806dc=jrosenthal@jhu.edu>\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 097D6431FAE\r
6         for <notmuch@notmuchmail.org>; Thu, 14 Jun 2012 11:16:08 -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: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\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 W8YKo5oemgCU for <notmuch@notmuchmail.org>;\r
16         Thu, 14 Jun 2012 11:16:07 -0700 (PDT)\r
17 X-Greylist: delayed 3603 seconds by postgrey-1.32 at olra;\r
18         Thu, 14 Jun 2012 11:16:07 PDT\r
19 Received: from smtpauth.johnshopkins.edu (smtpauth.johnshopkins.edu\r
20         [128.220.160.201]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id 73578431FB6\r
23         for <notmuch@notmuchmail.org>; Thu, 14 Jun 2012 11:16:07 -0700 (PDT)\r
24 X-IronPort-Anti-Spam-Filtered: true\r
25 X-IronPort-Anti-Spam-Result: AkwJAIwb2k8KoSES/2dsb2JhbABFtA0DgjOCGQEFeRAYFAwZDwEsGxm5EIkEjCmBcwyDGwObFwOMfw\r
26 X-IronPort-AV: E=Sophos;i="4.75,770,1330923600"; d="scan'208";a="173409136"\r
27 Received: from unknown (HELO watt) ([10.161.33.18])\r
28         by ipex4.johnshopkins.edu with ESMTP/TLS/AES256-SHA;\r
29         14 Jun 2012 13:16:01 -0400\r
30 Received: from jkr by watt with local (Exim 4.76)\r
31         (envelope-from <jrosenthal@jhu.edu>)\r
32         id 1SfDeN-000304-QQ; Thu, 14 Jun 2012 13:16:03 -0400\r
33 From: Jesse Rosenthal <jrosenthal@jhu.edu>\r
34 To: notmuch@notmuchmail.org\r
35 Subject: [PATCHv2] emacs: derive correct timestamp in FCC unique name\r
36 In-Reply-To: <87d353ezyw.fsf@jhu.edu>\r
37 References: <87d353ezyw.fsf@jhu.edu>\r
38 User-Agent: Notmuch/0.12~rc1 (http://notmuchmail.org) Emacs/24.1.50.1\r
39         (i686-pc-linux-gnu)\r
40 Date: Thu, 14 Jun 2012 13:16:03 -0400\r
41 Message-ID: <87y5npg6gc.fsf@jhu.edu>\r
42 MIME-Version: 1.0\r
43 Content-Type: text/plain\r
44 Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
45 X-BeenThere: notmuch@notmuchmail.org\r
46 X-Mailman-Version: 2.1.13\r
47 Precedence: list\r
48 List-Id: "Use and development of the notmuch mail system."\r
49         <notmuch.notmuchmail.org>\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
53 List-Post: <mailto:notmuch@notmuchmail.org>\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
57 X-List-Received-Date: Thu, 14 Jun 2012 18:16:08 -0000\r
58 \r
59 \r
60 Previously, the timestamp at the beginning of the FCC unique maildir\r
61 name was derived incorrectly, thanks to an integer overflow. This\r
62 changes the derivation of timestamp to use a float, and so will get\r
63 the number correct at least until 2038. (It is still formatted with\r
64 "%d" so it will show up as an integer.) Should we need to change it in\r
65 the next 26 years to take the unix millenium into account, it will be\r
66 invisible to users.\r
67 \r
68 This change is mostly a question of consistency, since the unique name\r
69 is arbitrary anyway. But since most people use timestamps, and that was\r
70 the original intention here as well, we might as well.\r
71 \r
72 Signed-off-by: Jesse Rosenthal <jrosenthal@jhu.edu>\r
73 ---\r
74  emacs/notmuch-maildir-fcc.el |    7 +++----\r
75  1 file changed, 3 insertions(+), 4 deletions(-)\r
76 \r
77 diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el\r
78 index dcfbc4b..07eedba 100644\r
79 --- a/emacs/notmuch-maildir-fcc.el\r
80 +++ b/emacs/notmuch-maildir-fcc.el\r
81 @@ -140,13 +140,12 @@ will NOT be removed or replaced."\r
82                             t))\r
83  \r
84  (defun notmuch-maildir-fcc-make-uniq-maildir-id ()\r
85 -   (let* ((ct (current-time))\r
86 -         (timeid (+ (* (car ct) 65536) (cadr ct)))\r
87 -         (microseconds (car (cdr (cdr ct))))\r
88 +   (let* ((ftime (float-time))\r
89 +         (microseconds (mod (* 1000000 ftime) 1000000))\r
90           (hostname (notmuch-maildir-fcc-host-fixer system-name)))\r
91       (setq notmuch-maildir-fcc-count (+ notmuch-maildir-fcc-count 1))\r
92       (format "%d.%d_%d_%d.%s"\r
93 -            timeid\r
94 +            ftime\r
95              (emacs-pid)\r
96              microseconds\r
97              notmuch-maildir-fcc-count\r
98 -- \r
99 1.7.9.5\r
100 \r