Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 90 / 95e4c52089103a7adc888636f5cbeeab699a05
1 Return-Path: <sojkam1@fel.cvut.cz>\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 153864196F0\r
6         for <notmuch@notmuchmail.org>; Thu,  1 Apr 2010 05:05:11 -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: -1.9\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9] 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 WV8kxvgmGg0l for <notmuch@notmuchmail.org>;\r
16         Thu,  1 Apr 2010 05:05:10 -0700 (PDT)\r
17 Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
18         by olra.theworths.org (Postfix) with ESMTP id 5ABC3431FC1\r
19         for <notmuch@notmuchmail.org>; Thu,  1 Apr 2010 05:05:10 -0700 (PDT)\r
20 Received: from localhost (unknown [192.168.200.4])\r
21         by max.feld.cvut.cz (Postfix) with ESMTP id 3BB9519F35D1;\r
22         Thu,  1 Apr 2010 14:05:09 +0200 (CEST)\r
23 X-Virus-Scanned: IMAP AMAVIS\r
24 Received: from max.feld.cvut.cz ([192.168.200.1])\r
25         by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new,\r
26         port 10044)\r
27         with ESMTP id JjTmf-aHcwQX; Thu,  1 Apr 2010 14:05:07 +0200 (CEST)\r
28 Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
29         by max.feld.cvut.cz (Postfix) with ESMTP id EF51819F33C6;\r
30         Thu,  1 Apr 2010 14:05:06 +0200 (CEST)\r
31 Received: from steelpick.2x.cz (k335-30.felk.cvut.cz [147.32.86.30])\r
32         (Authenticated sender: sojkam1)\r
33         by imap.feld.cvut.cz (Postfix) with ESMTPSA id A65B4FA003;\r
34         Thu,  1 Apr 2010 14:05:06 +0200 (CEST)\r
35 Received: from wsh by steelpick.2x.cz with local (Exim 4.71)\r
36         (envelope-from <sojkam1@fel.cvut.cz>)\r
37         id 1NxJ90-0004YW-AD; Thu, 01 Apr 2010 14:05:06 +0200\r
38 From: Michal Sojka <sojkam1@fel.cvut.cz>\r
39 To: David Edmondson <dme@dme.org>, David Bremner <david@tethera.net>,\r
40         Gregor Hoffleit <gregor@hoffleit.de>, notmuch <notmuch@notmuchmail.org>\r
41 In-Reply-To: <87634bjsrl.fsf@ut.hh.sledj.net>\r
42 References: <1267699753-sup-3919@sam.mediasupervision.de>\r
43         <871vezs8ne.fsf@rocinante.cs.unb.ca>\r
44         <87634bjsrl.fsf@ut.hh.sledj.net>\r
45 Date: Thu, 01 Apr 2010 14:05:06 +0200\r
46 Message-ID: <874ojv5qfh.fsf@steelpick.2x.cz>\r
47 MIME-Version: 1.0\r
48 Content-Type: text/plain; charset=us-ascii\r
49 Subject: Re: [notmuch] [PATCH] format_part_json: part_content->data is not\r
50         null terminated\r
51 X-BeenThere: notmuch@notmuchmail.org\r
52 X-Mailman-Version: 2.1.13\r
53 Precedence: list\r
54 List-Id: "Use and development of the notmuch mail system."\r
55         <notmuch.notmuchmail.org>\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
59 List-Post: <mailto:notmuch@notmuchmail.org>\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
63 X-List-Received-Date: Thu, 01 Apr 2010 12:05:11 -0000\r
64 \r
65 On Thu, 04 Mar 2010, Gregor Hoffleit wrote:\r
66 > -     printf (", \"content\": %s", json_quote_str (ctx, (char *) part_content->data));\r
67 > +     content_data = talloc_size (ctx, part_content->len+1);\r
68 > +     memcpy (content_data, (char *)part_content->data, part_content->len+1);\r
69 > +     content_data[part_content->len] = 0;\r
70 > +     printf (", \"content\": %s", json_quote_str (ctx, content_data));\r
71 \r
72 What about modifying json_quote_str() to accept additional parameter\r
73 len? If I have 10MB attachment to the email, this unnecessary copy is\r
74 quite expensive, isn't it?\r
75 \r
76 --Michal\r