Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / ad / 3b9d3d7244d0bf3a608d120190718c554020fc
1 Return-Path: <schnouki@schnouki.net>\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 575B4429E40\r
6         for <notmuch@notmuchmail.org>; Sat, 21 Jan 2012 16:21:12 -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.1\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1]\r
13         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 NQsWF3Hk1U2L for <notmuch@notmuchmail.org>;\r
17         Sat, 21 Jan 2012 16:21:11 -0800 (PST)\r
18 Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222])\r
19         by olra.theworths.org (Postfix) with ESMTP id A4888431FAF\r
20         for <notmuch@notmuchmail.org>; Sat, 21 Jan 2012 16:21:11 -0800 (PST)\r
21 Received: from odin.local (nancy.schnouki.net [78.238.0.45])\r
22         by ks3536.kimsufi.com (Postfix) with ESMTPSA id F03076C000A;\r
23         Sun, 22 Jan 2012 01:20:37 +0100 (CET)\r
24 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net;\r
25         s=key-schnouki; t=1327191638;\r
26         bh=r8aR65PGjaE3fHwxICZRLch+ZTcFP6mh8RhTlQe8URQ=;\r
27         h=From:To:Subject:Date:Message-Id:In-Reply-To:References;\r
28         b=W/XTXNGoA6gDqVcaZhf0ELR+sWTX2Q5A6hCWbMx4LRTJOVzPMu+KPp6/Tsd9wh0ff\r
29         +edWaT/XG8u4fIy1G3zTEjCOKDeDl7wfeMG7qOwPfnqUgjVGwj31HEsVwp6OdYC9Ut\r
30         QT5nguPZL8pZ59cneV6MOUyfXUH4vde9mr4i+rbc=\r
31 From: Thomas Jost <schnouki@schnouki.net>\r
32 To: notmuch@notmuchmail.org\r
33 Subject: [PATCH] show: don't use hex literals in JSON output\r
34 Date: Sun, 22 Jan 2012 01:20:57 +0100\r
35 Message-Id: <1327191657-13095-1-git-send-email-schnouki@schnouki.net>\r
36 X-Mailer: git-send-email 1.7.8.4\r
37 In-Reply-To: <87ipk6wlvv.fsf@convex-new.cs.unb.ca>\r
38 References: <87ipk6wlvv.fsf@convex-new.cs.unb.ca>\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Sun, 22 Jan 2012 00:21:12 -0000\r
52 \r
53 JSON does not support hex literals (0x..) so numbers must be formatted\r
54 as %d instead of %x.\r
55 \r
56 Currently, the possible values for the gmime error code are 1 (expired\r
57 signature), 2 (no public key), 4 (expired key) and 8 (revoked key).\r
58 The other possible value is 16 (unsupported algorithm) but obviously\r
59 it is much more rare. If this happens, the current code will add\r
60 '"errors": 10'. This is valid JSON (it looks like a decimal number)\r
61 but it is incorrect (should be 16, not 10).\r
62 \r
63 Since this is just an issue in the JSON encoder, no changes are needed\r
64 on the Emacs side (or in other UIs using the JSON output).\r
65 ---\r
66 \r
67  notmuch-show.c |    2 +-\r
68  1 files changed, 1 insertions(+), 1 deletions(-)\r
69 \r
70 diff --git a/notmuch-show.c b/notmuch-show.c\r
71 index 43ee211..7b40568 100644\r
72 --- a/notmuch-show.c\r
73 +++ b/notmuch-show.c\r
74 @@ -728,7 +728,7 @@ format_part_sigstatus_json (const GMimeSignatureValidity* validity)\r
75                 printf (", \"keyid\": %s", json_quote_str (ctx_quote, signer->keyid));\r
76         }\r
77         if (signer->errors != GMIME_SIGNER_ERROR_NONE) {\r
78 -           printf (", \"errors\": %x", signer->errors);\r
79 +           printf (", \"errors\": %d", signer->errors);\r
80         }\r
81  \r
82         printf ("}");\r
83 -- \r
84 1.7.8.4\r
85 \r