Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / a2 / b012058bf36a1c997f14acf9f0b045c749dfa6
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 olra.theworths.org (Postfix) with ESMTP id 4F702431FAF\r
6         for <notmuch@notmuchmail.org>; Wed, 18 Jan 2012 23:39:41 -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.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\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 X9iThESRK-WI for <notmuch@notmuchmail.org>;\r
16         Wed, 18 Jan 2012 23:39:40 -0800 (PST)\r
17 Received: from mail-we0-f181.google.com (mail-we0-f181.google.com\r
18         [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id A0E00431FAE\r
21         for <notmuch@notmuchmail.org>; Wed, 18 Jan 2012 23:39:40 -0800 (PST)\r
22 Received: by werp13 with SMTP id p13so2257211wer.26\r
23         for <notmuch@notmuchmail.org>; Wed, 18 Jan 2012 23:39:39 -0800 (PST)\r
24 Received: by 10.216.45.199 with SMTP id p49mr9361544web.42.1326958779251;\r
25         Wed, 18 Jan 2012 23:39:39 -0800 (PST)\r
26 Received: from hotblack-desiato.hh.sledj.net\r
27         (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25])\r
28         by mx.google.com with ESMTPS id u12sm1691321wiv.10.2012.01.18.23.39.37\r
29         (version=TLSv1/SSLv3 cipher=OTHER);\r
30         Wed, 18 Jan 2012 23:39:38 -0800 (PST)\r
31 Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)\r
32         id F2E239FE61; Thu, 19 Jan 2012 07:39:35 +0000 (GMT)\r
33 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
34 Subject: Re: [PATCH v2] emacs: Make the part content available to the\r
35         mm-inline* checks.\r
36 In-Reply-To: <874nvs96ps.fsf@gmail.com>\r
37 References: <1326907993-11054-1-git-send-email-dme@dme.org>\r
38         <1326908371-11949-1-git-send-email-dme@dme.org>\r
39         <877h0o99aj.fsf@gmail.com>\r
40         <cunlip47tir.fsf@hotblack-desiato.hh.sledj.net>\r
41         <874nvs96ps.fsf@gmail.com>\r
42 User-Agent: Notmuch/0.11+64~g42e8f66 (http://notmuchmail.org) Emacs/24.0.92.1\r
43         (x86_64-pc-linux-gnu)\r
44 From: David Edmondson <dme@dme.org>\r
45 Date: Thu, 19 Jan 2012 07:39:32 +0000\r
46 Message-ID: <cunboq06szv.fsf@hotblack-desiato.hh.sledj.net>\r
47 MIME-Version: 1.0\r
48 Content-Type: multipart/signed; boundary="=-=-=";\r
49         micalg=pgp-sha1; protocol="application/pgp-signature"\r
50 Cc: notmuch <notmuch@notmuchmail.org>\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, 19 Jan 2012 07:39:41 -0000\r
64 \r
65 --=-=-=\r
66 Content-Type: text/plain\r
67 Content-Transfer-Encoding: quoted-printable\r
68 \r
69 On Wed, 18 Jan 2012 23:00:15 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmai=\r
70 l.com> wrote:\r
71 > > That would allow a sane default (("image/*" "text/*") perhaps), but also\r
72 > > allow more to be added to that list (or some to be removed), either by\r
73 > > code that detected the (in)ability to render it or the user.\r
74 >=20\r
75 > Perhaps there is such a list in mm already?\r
76 \r
77 There's a function which does almost exactly this - `mm-inlinable-p'. It\r
78 has a list of types and tests, `mm-inline-media-tests'. Some of those\r
79 tests require access to the part content to decide if the part is\r
80 inlinable. Many of them don't. The image/jpeg test _does_ want access to\r
81 the part content.\r
82 \r
83 We're already using this function, of course.\r
84 \r
85 `mm-inlined-p' is the corresponding "does the user want this part\r
86 inlined" test. It's much simpler and never looks at the part content.\r
87 \r
88 Currently we merge those tests into one:\r
89 \r
90         (if (and (mm-inlinable-p handle)\r
91                  (mm-inlined-p handle))\r
92 \r
93 and have acquired part content either before or after the combined test.\r
94 \r
95 Perhaps we could test `mm-inlined-p' first, then insert the content,\r
96 then test `mm-inlinable-p'? That way we would not acquire the content\r
97 for parts for which the user (or code) has selected not to inline the\r
98 content.\r
99 \r
100 Currently `mm-inlined-p' suggests that the following should be inlined\r
101 by default:\r
102 \r
103     "image/.*" "text/.*" "message/delivery-status" "message/rfc822"\r
104     "message/partial" "message/external-body" "application/emacs-lisp"\r
105     "application/x-emacs-lisp" "application/pgp-signature"\r
106     "application/x-pkcs7-signature" "application/pkcs7-signature"\r
107     "application/x-pkcs7-mime" "application/pkcs7-mime"\r
108 \r
109 These are the only types for which we'd acquire the part content for\r
110 examination by `mm-inlinable-p' (by default).\r
111 \r
112 --=-=-=\r
113 Content-Type: application/pgp-signature\r
114 \r
115 -----BEGIN PGP SIGNATURE-----\r
116 Version: GnuPG v1.4.11 (GNU/Linux)\r
117 \r
118 iEYEARECAAYFAk8XyLQACgkQaezQq/BJZRZ+fwCfViecAHmqysxKht+mkXJwMQbW\r
119 htcAniAMF20oMd+IItd9aq2iiXqFHQRo\r
120 =fif9\r
121 -----END PGP SIGNATURE-----\r
122 --=-=-=--\r