Re: [RFC PATCH] test: add devel/test-in-docker.sh
[notmuch-archives.git] / 41 / b02af9a1a412d7222d9553610fbcc520098a19
1 Return-Path: <dme@dme.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 35C136DE14FD\r
6  for <notmuch@notmuchmail.org>; Tue,  9 Feb 2016 12:32:20 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.087\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.087 tagged_above=-999 required=5\r
12  tests=[AWL=-0.020, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,\r
13  RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01,\r
14  RCVD_IN_MSPIKE_WL=-0.01, SPF_NEUTRAL=0.652, UNPARSEABLE_RELAY=0.001]\r
15  autolearn=disabled\r
16 Received: from arlo.cworth.org ([127.0.0.1])\r
17  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
18  with ESMTP id jy1j5TzyHquY for <notmuch@notmuchmail.org>;\r
19  Tue,  9 Feb 2016 12:32:18 -0800 (PST)\r
20 Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com\r
21  [74.125.82.68]) by arlo.cworth.org (Postfix) with ESMTPS id 0B6D96DE01D3 for\r
22  <notmuch@notmuchmail.org>; Tue,  9 Feb 2016 12:32:18 -0800 (PST)\r
23 Received: by mail-wm0-f68.google.com with SMTP id p63so59099wmp.1\r
24  for <notmuch@notmuchmail.org>; Tue, 09 Feb 2016 12:32:17 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
26  d=dme-org.20150623.gappssmtp.com; s=20150623;\r
27  h=to:subject:in-reply-to:references:from:date:message-id:mime-version\r
28  :content-type; bh=tl4jJGpsyLPvEb1hWmKE0UmrCBIQbnCFKR+LaYlLLnE=;\r
29  b=V6b2thQNi43sbBO9DwWNXJwtLe5yKS89PgbFYu4QFzD9bDWCyNEa2ptOHyo29f1zxG\r
30  a8Cplm0e1OIY0WRbuTJQeP9NHhgQ+pmFfp67fuyvubegSAGNiyJy4vSuTeEcSrRz1hKm\r
31  yvmcArvnwMBEoYxzUuqWH5tkhsJ1oTE5G18UGuxgbwMHXH+L03Ee5z8UVgj3/3E53VV4\r
32  PEwZNkMiocuj2/on2KXzPPgMrZvTxoOvEyV3uMlanFADWjVyKxoaPrkb2r8Q0nWJZi2C\r
33  0lpFea2h9aAWaX7sMUI7s8QsmAb1ABj1vqmiP01u7+4acT40qQeZYUtxEeN1dZLYjD6h\r
34  uSMQ==\r
35 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
36  d=1e100.net; s=20130820;\r
37  h=x-gm-message-state:to:subject:in-reply-to:references:from:date\r
38  :message-id:mime-version:content-type;\r
39  bh=tl4jJGpsyLPvEb1hWmKE0UmrCBIQbnCFKR+LaYlLLnE=;\r
40  b=eZermYubUxb9qN5VT6K8Jq2RsmYme+CxXwqjIJXl/nFiOf/pYCoqklLula2b7zsZ+m\r
41  GxFVrIon1P7DMndAT7T5AP7crh0/0kCUEq5bsu3e2uHJ1Is9UXTRmTL3nC42wln15Pd3\r
42  GBjPHeYCqMFYrAgN5Z913OAWQKKqQuRc/q2ipgLoSxRzxsqrqgJ0kDVjt6J6EeOAxOfO\r
43  IUrXNVl1k0X9EO+o/G66v4XbkhkfEF9zsJrZUWKGzdTehksylPowDlQazIvXn5JczA4E\r
44  X9r7qTK+RcJw5QwHERp1cy40XotJk3wEd2ZXsKk7myCmWy7rVroXRokWWVRGBoacZDJg\r
45  886w==\r
46 X-Gm-Message-State:\r
47  AG10YOTugjPIhZrOu0lV/KwhkPKOXu4DZVmId0x5TeNobLZ3Ds4wkLCrH8XaLfUbY4wInA==\r
48 X-Received: by 10.194.87.201 with SMTP id ba9mr35816752wjb.128.1455049936716; \r
49  Tue, 09 Feb 2016 12:32:16 -0800 (PST)\r
50 Received: from disaster-area.hh.sledj.net\r
51  ([2a01:348:1a2:1:ea39:35ff:fe2c:a227])\r
52  by smtp.gmail.com with ESMTPSA id bg1sm36397861wjc.27.2016.02.09.12.32.15\r
53  (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
54  Tue, 09 Feb 2016 12:32:15 -0800 (PST)\r
55 Received: from localhost (disaster-area.hh.sledj.net [local])\r
56  by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 33ba720f;\r
57  Tue, 9 Feb 2016 20:32:13 +0000 (UTC)\r
58 To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org\r
59 Subject: Re: [PATCH v4 5/7] emacs/show: Make the insertion of part headers\r
60  overridable.\r
61 In-Reply-To: <1446894276-7814-6-git-send-email-markwalters1009@gmail.com>\r
62 References: <1446894276-7814-1-git-send-email-markwalters1009@gmail.com>\r
63  <1446894276-7814-6-git-send-email-markwalters1009@gmail.com>\r
64 From: David Edmondson <dme@dme.org>\r
65 Date: Tue, 09 Feb 2016 20:32:13 +0000\r
66 Message-ID: <m24mdh4oc2.fsf@dme.org>\r
67 MIME-Version: 1.0\r
68 Content-Type: text/plain\r
69 X-BeenThere: notmuch@notmuchmail.org\r
70 X-Mailman-Version: 2.1.20\r
71 Precedence: list\r
72 List-Id: "Use and development of the notmuch mail system."\r
73  <notmuch.notmuchmail.org>\r
74 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
75  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
76 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
77 List-Post: <mailto:notmuch@notmuchmail.org>\r
78 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
79 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
80  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
81 X-List-Received-Date: Tue, 09 Feb 2016 20:32:20 -0000\r
82 \r
83 On Sat, Nov 07 2015, Mark Walters wrote:\r
84 > From: David Edmondson <dme@dme.org>\r
85 >\r
86 > This allows callers of notmuch-show-insert-bodypart to use a `let'\r
87 > binding to override the default function for specifying when part\r
88 > headers should be inserted.\r
89 \r
90 Looks fine.\r
91 \r
92 > ---\r
93 >  emacs/notmuch-show.el | 16 ++++++++++++----\r
94 >  1 file changed, 12 insertions(+), 4 deletions(-)\r
95 >\r
96 > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
97 > index f8184e2..f4a65cc 100644\r
98 > --- a/emacs/notmuch-show.el\r
99 > +++ b/emacs/notmuch-show.el\r
100 > @@ -945,8 +945,16 @@ (defun notmuch-show-mime-type (part)\r
101 >            "text/x-diff")\r
102 >       content-type)))\r
103 >  \r
104 > +;; The following variable can be overridden by let bindings.\r
105 > +(defvar notmuch-show-insert-header-p-function 'notmuch-show-insert-header-p\r
106 > +  "Specify which function decides which part headers get inserted.\r
107 > +\r
108 > +The function should take two parameters, PART and HIDE, and\r
109 > +should return non-NIL if a header button should be inserted for\r
110 > +this part.")\r
111 > +\r
112 >  (defun notmuch-show-insert-header-p (part hide)\r
113 > -  "Return non-NIL if a header button should be inserted for this part."\r
114 > +  ;; Show all part buttons except for the first part if it is text/plain.\r
115 >    (let ((mime-type (notmuch-show-mime-type part)))\r
116 >      (not (and (string= mime-type "text/plain")\r
117 >             (<= (plist-get part :id) 1)))))\r
118 > @@ -965,9 +973,9 @@ (defun notmuch-show-insert-bodypart (msg part depth &optional hide)\r
119 >                   (> notmuch-show-max-text-part-size 0)\r
120 >                   (> (length (plist-get part :content)) notmuch-show-max-text-part-size)))\r
121 >        (beg (point))\r
122 > -      ;; We omit the part button for the first (or only) part if\r
123 > -      ;; this is text/plain, or HIDE is 'no-buttons.\r
124 > -      (button (when (notmuch-show-insert-header-p part hide)\r
125 > +      ;; This default header-p function omits the part button for\r
126 > +      ;; the first (or only) part if this is text/plain.\r
127 > +      (button (when (funcall notmuch-show-insert-header-p-function part hide)\r
128 >                  (notmuch-show-insert-part-header nth mime-type content-type (plist-get part :filename))))\r
129 >        ;; Hide the part initially if HIDE is t, or if it is too long\r
130 >        ;; and we have a button to allow toggling (thus reply which\r
131 > -- \r
132 > 2.1.4\r