Re: [PATCH] Fix typo in Message.maildir_flags_to_tags
[notmuch-archives.git] / 60 / 13661f65efc2d1a2fadac2b0e2bd2103e9d53c
1 Return-Path: <dmitry.kurochkin@gmail.com>\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 9EA45429E25\r
6         for <notmuch@notmuchmail.org>; Fri,  9 Dec 2011 12:00:35 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id KZMmXIPy0+35 for <notmuch@notmuchmail.org>;\r
17         Fri,  9 Dec 2011 12:00:35 -0800 (PST)\r
18 Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com\r
19         [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 0A4B1431FB6\r
22         for <notmuch@notmuchmail.org>; Fri,  9 Dec 2011 12:00:34 -0800 (PST)\r
23 Received: by bkat8 with SMTP id t8so3562540bka.26\r
24         for <notmuch@notmuchmail.org>; Fri, 09 Dec 2011 12:00:32 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=from:to:cc:subject:in-reply-to:references:user-agent:date\r
27         :message-id:mime-version:content-type;\r
28         bh=6y7BNmkdU49JxlJZYVus7fWw76/0Ox1Ho/DSoN+Fybk=;\r
29         b=J704yeo8A+vCX31YEbiMtQMmv8t6Cdwq4xsnZGNFa0MUX0JWkl6xVBvGeNA2eIW3jL\r
30         pFZc82C3BHrIPDKXzoSYSh+9+79Cpef+TmO7JVSyCchvIS1bI7qnSrcacqaAd6MjIeH4\r
31         h69gZGi5zpIxmYsDedeFfkUwlHcIc+v3HLOew=\r
32 Received: by 10.205.127.2 with SMTP id gy2mr3644351bkc.87.1323460832411;\r
33         Fri, 09 Dec 2011 12:00:32 -0800 (PST)\r
34 Received: from localhost ([91.144.186.21])\r
35         by mx.google.com with ESMTPS id p13sm12345880bkd.4.2011.12.09.12.00.31\r
36         (version=TLSv1/SSLv3 cipher=OTHER);\r
37         Fri, 09 Dec 2011 12:00:31 -0800 (PST)\r
38 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
39 To: Austin Clements <amdragon@MIT.EDU>, David Bremner <david@tethera.net>\r
40 Subject: Re: [PATCH 1/4] show: Pass notmuch_message_t instead of path to\r
41         show_message_body.\r
42 In-Reply-To: <20111209195426.GJ3190@mit.edu>\r
43 References: <1322446871-14986-1-git-send-email-amdragon@mit.edu>\r
44         <1323027100-10307-1-git-send-email-amdragon@mit.edu>\r
45         <1323027100-10307-2-git-send-email-amdragon@mit.edu>\r
46         <87ty597eh8.fsf@gmail.com> <20111209195426.GJ3190@mit.edu>\r
47 User-Agent: Notmuch/0.10.2+82~g96a629c (http://notmuchmail.org) Emacs/23.3.1\r
48         (x86_64-pc-linux-gnu)\r
49 Date: Fri, 09 Dec 2011 23:59:59 +0400\r
50 Message-ID: <87pqfx7by8.fsf@gmail.com>\r
51 MIME-Version: 1.0\r
52 Content-Type: text/plain; charset=us-ascii\r
53 Cc: notmuch@notmuchmail.org\r
54 X-BeenThere: notmuch@notmuchmail.org\r
55 X-Mailman-Version: 2.1.13\r
56 Precedence: list\r
57 List-Id: "Use and development of the notmuch mail system."\r
58         <notmuch.notmuchmail.org>\r
59 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
61 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
62 List-Post: <mailto:notmuch@notmuchmail.org>\r
63 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
64 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
65         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
66 X-List-Received-Date: Fri, 09 Dec 2011 20:00:35 -0000\r
67 \r
68 On Fri, 9 Dec 2011 14:54:26 -0500, Austin Clements <amdragon@MIT.EDU> wrote:\r
69 > Quoth Dmitry Kurochkin on Dec 09 at 11:05 pm:\r
70 > > On Sun,  4 Dec 2011 14:31:37 -0500, Austin Clements <amdragon@MIT.EDU> wrote:\r
71 > > >  }\r
72 > > >  \r
73 > > >  notmuch_status_t\r
74 > > > -show_message_body (const char *filename,\r
75 > > > +show_message_body (notmuch_message_t *message,\r
76 > > >              const notmuch_show_format_t *format,\r
77 > > >              notmuch_show_params_t *params)\r
78 > > \r
79 > > Is show_message_body() (or functions that it calls/would call) supposed\r
80 > > to modify the message structure?  If not, we should make it const.\r
81\r
82 > That would be nice, but lack of const in libnotmuch makes it difficult\r
83 > to do this (for example, notmuch_message_get_filename, which\r
84 > show_message_body calls, takes a non-const notmuch_message_t *).\r
85\r
86 > OTOH, since functions like notmuch_message_get_filename lazily compute\r
87 > fields of notmuch_message_t and C has no equivalent of C++'s mutable,\r
88 > it's not clear making the message const is even the right thing to do.\r
89\r
90 \r
91 If there are fields that are computed lazily (I just did not know it),\r
92 we can not make it const.\r
93 \r
94 \r
95 The patch looks good.  I think it can be pushed before the rest of the\r
96 patches are reviewed/ready.\r
97 \r
98 Regards,\r
99   Dmitry\r
100 \r
101 > > I would also make all pointers constant (i.e. const notmuch_message_t\r
102 > > *const message), but I can not insist since it is not common in notmuch.\r
103 > > \r
104 > > Regards,\r
105 > >   Dmitry\r