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 B29AB6DE02C9
\r
6 for <notmuch@notmuchmail.org>; Sun, 3 Apr 2016 09:04:51 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=-0.166 tagged_above=-999 required=5
\r
12 tests=[AWL=-0.099, 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
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 FN2v-1jDnmOi for <notmuch@notmuchmail.org>;
\r
19 Sun, 3 Apr 2016 09:04:43 -0700 (PDT)
\r
20 Received: from mail-lb0-f193.google.com (mail-lb0-f193.google.com
\r
22 by arlo.cworth.org (Postfix) with ESMTPS id 1EA2F6DE0159
\r
23 for <notmuch@notmuchmail.org>; Sun, 3 Apr 2016 09:04:43 -0700 (PDT)
\r
24 Received: by mail-lb0-f193.google.com with SMTP id vk4so17542234lbb.1
\r
25 for <notmuch@notmuchmail.org>; Sun, 03 Apr 2016 09:04:43 -0700 (PDT)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
27 d=dme-org.20150623.gappssmtp.com; s=20150623;
\r
28 h=from:to:subject:date:message-id;
\r
29 bh=hs2+c7+ittloHbrCI7LyEvlOjwlNMaLEMSlwazQ1T6c=;
\r
30 b=wv3PdNpmM4v16JutHnUzftWEcWiZvUVxkWI7wGROQCfBuDVR0RLwsmxFnyQR7jbEPk
\r
31 6iz6v3Eh7wfwiENLtAkaHg87FTxCdFvhUoOb8tKWHlLMvRifg4lnu6Dho1QXEuCz2/JM
\r
32 nv6NLZhByRrWSabiJaMETtaW5BL3H0YDL393/W3YFf+E+9f6lMo+93Fxw7VzorptG3ew
\r
33 JdRrYgwPoXYFOIlqhRrKUHzrXFfFLscMmgvh/kgO7HxFF9tOkBj2WokIwGQvCk5M3TRe
\r
34 yU4myUjPShlj35nRc7/+XD7MBY3AaRgq7nQ1Bgyq1gZBDLQbp52KV88ARLQEWNsZ/39z
\r
36 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
37 d=1e100.net; s=20130820;
\r
38 h=x-gm-message-state:from:to:subject:date:message-id;
\r
39 bh=hs2+c7+ittloHbrCI7LyEvlOjwlNMaLEMSlwazQ1T6c=;
\r
40 b=cQdZhli/TRDw6Solt+uJDs/VuMPVQIyZ7NIDMiBQdzD5D0l7J5v2k0jjELaRnIZN9W
\r
41 amsHAYH+CObb/NoelQTepokr1zI289Tqvb5o5h+Yyi/KF74DnqF9xkokg56/zXXaSuBh
\r
42 VEjWNM5TqBZkiPx4y/bmt43jEWw+ANZD0CrTfWf1mpPQsd4m8QgaEwdoRxEXo64fdxiI
\r
43 tWzbQYaZYcT2R4xwuLnNSNoCrKh9mJSouMCyJgmQtPP1JogIzVloHu2/BvYQgBLAkGk8
\r
44 WrIibXgUv2AcK5el8IF8QpDIa4/ExowpCgvCNdsALyWqAZ1muz5t1gACFGW+KYOORXh7
\r
47 AD7BkJKyomXbLv2XrV+BDLHVdN8T781mw2gUiua79gpMLCiEfjo5d/CS7LLiL2cTYoVAoA==
\r
48 X-Received: by 10.28.136.211 with SMTP id k202mr8055209wmd.93.1459699481369;
\r
49 Sun, 03 Apr 2016 09:04:41 -0700 (PDT)
\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 gk4sm24351438wjd.7.2016.04.03.09.04.39
\r
53 for <notmuch@notmuchmail.org>
\r
54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
\r
55 Sun, 03 Apr 2016 09:04:39 -0700 (PDT)
\r
56 Received: from localhost (disaster-area.hh.sledj.net [local])
\r
57 by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 47376ba4
\r
58 for <notmuch@notmuchmail.org>; Sun, 3 Apr 2016 16:04:38 +0000 (UTC)
\r
59 From: David Edmondson <dme@dme.org>
\r
60 To: notmuch@notmuchmail.org
\r
61 Subject: [PATCH v3] Allow content preference based on message content.
\r
62 Date: Sun, 3 Apr 2016 17:04:37 +0100
\r
63 Message-Id: <1459699478-21167-1-git-send-email-dme@dme.org>
\r
64 X-Mailer: git-send-email 2.1.4
\r
65 X-BeenThere: notmuch@notmuchmail.org
\r
66 X-Mailman-Version: 2.1.20
\r
68 List-Id: "Use and development of the notmuch mail system."
\r
69 <notmuch.notmuchmail.org>
\r
70 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,
\r
71 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
72 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
73 List-Post: <mailto:notmuch@notmuchmail.org>
\r
74 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
75 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,
\r
76 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
77 X-List-Received-Date: Sun, 03 Apr 2016 16:04:51 -0000
\r
80 Allow content preference based on message content.
\r
82 An example configuration might be:
\r
84 (defun dme:determine-discouraged (msg)
\r
85 (let* ((headers (plist-get msg :headers))
\r
86 (from (or (plist-get headers :From) "")))
\r
88 ((string-match "9195404@capita-intouch.co.uk" from)
\r
91 '("text/html" "multipart/related")))))
\r
93 (setq notmuch-multipart/alternative-discouraged
\r
94 'dme:determine-discouraged)
\r
96 This would discourage text/html and multipart/related generally, but
\r
97 discourage text/plain should the message be sent from
\r
98 9195404@capita-intouch.co.uk.
\r
101 - Remove the simple evaluation variant based on feedback.
\r
105 - Update the example to allow for a nil msg (which should no longer
\r
106 happen, but it's good to be safe).
\r
109 David Edmondson (1):
\r
110 emacs: Allow part preferences to depend on message content.
\r
112 emacs/notmuch-lib.el | 20 ++++++++++++++++----
\r
113 emacs/notmuch-show.el | 2 +-
\r
114 2 files changed, 17 insertions(+), 5 deletions(-)
\r