Re: Linking a privately built -lxapian
[notmuch-archives.git] / 9c / 8145c253a0943c024daed9b40a9a0431b44afb
1 Return-Path: <jani@nikula.org>\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 arlo.cworth.org (Postfix) with ESMTP id 1EEFB6DE0AC2\r
6  for <notmuch@notmuchmail.org>; Sat, 26 Sep 2015 02:37:58 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.525\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.525 tagged_above=-999 required=5 tests=[AWL=0.195,\r
12   RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01]\r
13  autolearn=disabled\r
14 Received: from arlo.cworth.org ([127.0.0.1])\r
15  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
16  with ESMTP id x3xhwB26Ci5z for <notmuch@notmuchmail.org>;\r
17  Sat, 26 Sep 2015 02:37:56 -0700 (PDT)\r
18 Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com\r
19  [209.85.212.177])\r
20  by arlo.cworth.org (Postfix) with ESMTPS id 0BA1C6DE0924\r
21  for <notmuch@notmuchmail.org>; Sat, 26 Sep 2015 02:35:46 -0700 (PDT)\r
22 Received: by wicfx3 with SMTP id fx3so45966927wic.0\r
23  for <notmuch@notmuchmail.org>; Sat, 26 Sep 2015 02:35:44 -0700 (PDT)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25  d=1e100.net; s=20130820;\r
26  h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to\r
27  :references;\r
28  bh=PwqranSoydLzjdKWu/KDIpCokQ7PcNlES/UWaDGtTxo=;\r
29  b=jbVc0j5c1vVCuffuxhwGw95JAQJ0bD3GkYTzlhBkS2VfXzcCnJWbHT4y6+vQsdLADG\r
30  /K2W5LUZkUOHip29AA4vk3O+oYuMSRqBsKD6F5tV7tsEYh0II9YIr8rTXAM2A5QHe3Q3\r
31  oTXzo9cYQeoExHTLuwMOF4xizD+wEqXWmgKfZ2+FrfeI0DGslmVrO/WrrMsJmvn/s0Sc\r
32  vd0IzDWGu/w8t1Dq07KhDwwJpjiEcBfWarDchwbiwjbyat3Di5exsZTAQARN/cAquCA5\r
33  oyqI9cP6g4WqQGSHzkQ7xSEt9IqqvcVIE5XnngsAhr9T6wagG9Sx51ApMANADQh1IwKr\r
34  Lvpw==\r
35 X-Gm-Message-State:\r
36  ALoCoQkIFW5ur23jIf5OBAsG1oSbWpAffnMotV+aiaoVIKf2vVjqX5sCG4QeDtALc7sNrd7dnyJ0\r
37 X-Received: by 10.180.8.106 with SMTP id q10mr7434830wia.92.1443260144320;\r
38  Sat, 26 Sep 2015 02:35:44 -0700 (PDT)\r
39 Received: from localhost (mobile-access-bcee63-221.dhcp.inet.fi.\r
40  [188.238.99.221])\r
41  by smtp.gmail.com with ESMTPSA id fs9sm7437735wic.24.2015.09.26.02.35.43\r
42  (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
43  Sat, 26 Sep 2015 02:35:43 -0700 (PDT)\r
44 From: Jani Nikula <jani@nikula.org>\r
45 To: David Bremner <david@tethera.net>, Johannes Schauer <josch@debian.org>,\r
46  notmuch@notmuchmail.org\r
47 Subject: [PATCH 2/2] cli: content disposition values are not case-sensitive\r
48 Date: Sat, 26 Sep 2015 12:35:22 +0300\r
49 Message-Id: <1443260122-5122-2-git-send-email-jani@nikula.org>\r
50 X-Mailer: git-send-email 2.1.4\r
51 In-Reply-To: <1443260122-5122-1-git-send-email-jani@nikula.org>\r
52 References: <871tdvvoyf.fsf@tesseract.cs.unb.ca>\r
53  <1443260122-5122-1-git-send-email-jani@nikula.org>\r
54 X-BeenThere: notmuch@notmuchmail.org\r
55 X-Mailman-Version: 2.1.18\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: Sat, 26 Sep 2015 09:37:58 -0000\r
67 \r
68 Per RFC 2183, the values for Content-Disposition values are not\r
69 case-sensitive. While at it, use the gmime function for getting at the\r
70 disposition string instead of referencing the field directly.\r
71 \r
72 This fixes attachment display and quoting in notmuch show and reply,\r
73 respectively.\r
74 ---\r
75  notmuch-reply.c | 3 ++-\r
76  notmuch-show.c  | 3 ++-\r
77  2 files changed, 4 insertions(+), 2 deletions(-)\r
78 \r
79 diff --git a/notmuch-reply.c b/notmuch-reply.c\r
80 index fd6a1ec1b11d..437c4ed5acc2 100644\r
81 --- a/notmuch-reply.c\r
82 +++ b/notmuch-reply.c\r
83 @@ -80,7 +80,8 @@ format_part_reply (mime_node_t *node)\r
84             show_text_part_content (node->part, stream_stdout, NOTMUCH_SHOW_TEXT_PART_REPLY);\r
85             g_object_unref(stream_stdout);\r
86         } else if (disposition &&\r
87 -                  strcmp (disposition->disposition, GMIME_DISPOSITION_ATTACHMENT) == 0) {\r
88 +                  strcasecmp (g_mime_content_disposition_get_disposition (disposition),\r
89 +                              GMIME_DISPOSITION_ATTACHMENT) == 0) {\r
90             const char *filename = g_mime_part_get_filename (GMIME_PART (node->part));\r
91             printf ("Attachment: %s (%s)\n", filename,\r
92                     g_mime_content_type_to_string (content_type));\r
93 diff --git a/notmuch-show.c b/notmuch-show.c\r
94 index e05480899b33..e9f4dffe0877 100644\r
95 --- a/notmuch-show.c\r
96 +++ b/notmuch-show.c\r
97 @@ -456,7 +456,8 @@ format_part_text (const void *ctx, sprinter_t *sp, mime_node_t *node,\r
98             g_mime_part_get_filename (GMIME_PART (node->part)) : NULL;\r
99  \r
100         if (disposition &&\r
101 -           strcmp (disposition->disposition, GMIME_DISPOSITION_ATTACHMENT) == 0)\r
102 +           strcasecmp (g_mime_content_disposition_get_disposition (disposition),\r
103 +                       GMIME_DISPOSITION_ATTACHMENT) == 0)\r
104             part_type = "attachment";\r
105         else\r
106             part_type = "part";\r
107 -- \r
108 2.1.4\r
109 \r