Flat search and threaded views
[notmuch-archives.git] / f2 / e2fdd828bed2994f3238bb497c1b1edd152ee3
1 Return-Path: <tomi.ollila@iki.fi>\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 11A20431FB6\r
6         for <notmuch@notmuchmail.org>; Thu, 14 Jun 2012 12:04:50 -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 6FniGgvx646G for <notmuch@notmuchmail.org>;\r
16         Thu, 14 Jun 2012 12:04:48 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 892D7431FAE\r
19         for <notmuch@notmuchmail.org>; Thu, 14 Jun 2012 12:04:48 -0700 (PDT)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 333721000D0; Thu, 14 Jun 2012 22:04:58 +0300 (EEST)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: Jesse Rosenthal <jrosenthal@jhu.edu>, notmuch@notmuchmail.org\r
24 Subject: Re: [PATCHv2] emacs: derive correct timestamp in FCC unique name\r
25 In-Reply-To: <87y5npg6gc.fsf@jhu.edu>\r
26 References: <87d353ezyw.fsf@jhu.edu> <87y5npg6gc.fsf@jhu.edu>\r
27 User-Agent: Notmuch/0.13.2+7~g2fb5bbc (http://notmuchmail.org) Emacs/23.1.1\r
28         (x86_64-redhat-linux-gnu)\r
29 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
30         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
31         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
32 Date: Thu, 14 Jun 2012 22:04:58 +0300\r
33 Message-ID: <m2pq91iujp.fsf@guru.guru-group.fi>\r
34 MIME-Version: 1.0\r
35 Content-Type: text/plain; charset=us-ascii\r
36 X-BeenThere: notmuch@notmuchmail.org\r
37 X-Mailman-Version: 2.1.13\r
38 Precedence: list\r
39 List-Id: "Use and development of the notmuch mail system."\r
40         <notmuch.notmuchmail.org>\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
42         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
44 List-Post: <mailto:notmuch@notmuchmail.org>\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
48 X-List-Received-Date: Thu, 14 Jun 2012 19:04:50 -0000\r
49 \r
50 On Thu, Jun 14 2012, Jesse Rosenthal <jrosenthal@jhu.edu> wrote:\r
51 \r
52 > Previously, the timestamp at the beginning of the FCC unique maildir\r
53 > name was derived incorrectly, thanks to an integer overflow. This\r
54 > changes the derivation of timestamp to use a float, and so will get\r
55 > the number correct at least until 2038. (It is still formatted with\r
56 > "%d" so it will show up as an integer.) Should we need to change it in\r
57 > the next 26 years to take the unix millenium into account, it will be\r
58 > invisible to users.\r
59 >\r
60 > This change is mostly a question of consistency, since the unique name\r
61 > is arbitrary anyway. But since most people use timestamps, and that was\r
62 > the original intention here as well, we might as well.\r
63 >\r
64 > Signed-off-by: Jesse Rosenthal <jrosenthal@jhu.edu>\r
65 > ---\r
66 \r
67 \r
68 +1\r
69 \r
70 \r
71 Tomi\r
72 \r
73 >  emacs/notmuch-maildir-fcc.el |    7 +++----\r
74 >  1 file changed, 3 insertions(+), 4 deletions(-)\r
75 >\r
76 > diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el\r
77 > index dcfbc4b..07eedba 100644\r
78 > --- a/emacs/notmuch-maildir-fcc.el\r
79 > +++ b/emacs/notmuch-maildir-fcc.el\r
80 > @@ -140,13 +140,12 @@ will NOT be removed or replaced."\r
81 >                           t))\r
82 >  \r
83 >  (defun notmuch-maildir-fcc-make-uniq-maildir-id ()\r
84 > -   (let* ((ct (current-time))\r
85 > -       (timeid (+ (* (car ct) 65536) (cadr ct)))\r
86 > -       (microseconds (car (cdr (cdr ct))))\r
87 > +   (let* ((ftime (float-time))\r
88 > +       (microseconds (mod (* 1000000 ftime) 1000000))\r
89 >         (hostname (notmuch-maildir-fcc-host-fixer system-name)))\r
90 >       (setq notmuch-maildir-fcc-count (+ notmuch-maildir-fcc-count 1))\r
91 >       (format "%d.%d_%d_%d.%s"\r
92 > -          timeid\r
93 > +          ftime\r
94 >            (emacs-pid)\r
95 >            microseconds\r
96 >            notmuch-maildir-fcc-count\r
97 > -- \r
98 > 1.7.9.5\r
99 >\r
100 > _______________________________________________\r
101 > notmuch mailing list\r
102 > notmuch@notmuchmail.org\r
103 > http://notmuchmail.org/mailman/listinfo/notmuch\r