From: David Edmondson Date: Fri, 15 Jan 2016 13:34:57 +0000 (+0000) Subject: [RFC][PATCH v1] Allow content preference based on message content. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=259a66d40e0adc621d399bf240f303db3ed898d5;p=notmuch-archives.git [RFC][PATCH v1] Allow content preference based on message content. --- diff --git a/77/d2829f7513dd2a9ea564b183f52878eade022f b/77/d2829f7513dd2a9ea564b183f52878eade022f new file mode 100644 index 000000000..0d3cea6d7 --- /dev/null +++ b/77/d2829f7513dd2a9ea564b183f52878eade022f @@ -0,0 +1,106 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id E6DDE6DE1995 + for ; Fri, 15 Jan 2016 05:35:05 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.475 +X-Spam-Level: +X-Spam-Status: No, score=0.475 tagged_above=-999 required=5 tests=[AWL=0.542, + DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, + RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_NEUTRAL=0.652, + UNPARSEABLE_RELAY=0.001] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id BMj-moHRGbyJ for ; + Fri, 15 Jan 2016 05:35:04 -0800 (PST) +Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com + [74.125.82.65]) by arlo.cworth.org (Postfix) with ESMTPS id AB26B6DE00DD for + ; Fri, 15 Jan 2016 05:35:03 -0800 (PST) +Received: by mail-wm0-f65.google.com with SMTP id u188so2889130wmu.0 + for ; Fri, 15 Jan 2016 05:35:03 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=dme-org.20150623.gappssmtp.com; s=20150623; + h=from:to:subject:date:message-id; + bh=U/OXyxkcr01LqFxN/K0oN0lteztNnfsPXXPeyzDhC48=; + b=Re6MSrJRDdZZz5DttdUerN2WZCk0nkT2hSumVGSxVb70roBw2qIyhbnFDYygp/lRjt + a2MpikgqTezD03gQolKMspPgo0Wkzqsm/bUOaHf+1+wKpfCdAfxw4CTkHzX1yf0qv3Td + 9nGzEswv/CID2lJHi7puxJR6SfHhMj1gPNqHEO5WQHvCIChB2hPI4IhZt8D1yGlt4Av5 + nsu6vWP7O+3zfRStDcf1iNm7gdrddQMPH5w0OUJQJl/qmkF2rwsMYb79jZOSfndDdRMz + dE0rtg71NnQl01LkODQvvW7lKjnnUhKhjvCuao9QpeYGDcuZGhPYazEgt/d1llJr6uc9 + h8NQ== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:subject:date:message-id; + bh=U/OXyxkcr01LqFxN/K0oN0lteztNnfsPXXPeyzDhC48=; + b=KihUcb1icoF8p4iaBld0ZoWYjA9K1Hbz98IYdW4gbqzL7vAxJh4NwDjZfd/S/rIgvG + PSbV4Qy6BVhVPUBOR6qNCYtdMTpU+n1nehaEJQhr+Cf04XS7kQjxPcvcMjSw1pN1jg8a + 789tnhz/RSV0ylD0cazjcUIapAHRnqXwiUKcMv3WdvxjAnxGlvBnSMF3yLM1NHERxPcZ + Yk8D5X9LKQyOLvizYMEg1q9fthiZdUv+u7U9ZU6+rwznLNQ1VkdjJnNedHKrMqU0tL/N + 46ARgQCTAoRO6sYSCkn1gNMn1XKpjUaNZ4N3uGpmiihqv5b2xW8lvabBw4iPviWHW6LG + dD4Q== +X-Gm-Message-State: + AG10YOSKF5lAiSZnWC65xHOTxfzaL7UYNNEj7awQvYR2xZD2Is6jwhztiZJWUDGohBI1EQ== +X-Received: by 10.28.216.211 with SMTP id p202mr3577545wmg.84.1452864900475; + Fri, 15 Jan 2016 05:35:00 -0800 (PST) +Received: from disaster-area.hh.sledj.net + ([2a01:348:1a2:1:ea39:35ff:fe2c:a227]) + by smtp.gmail.com with ESMTPSA id id1sm10648439wjb.19.2016.01.15.05.34.59 + for + (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Fri, 15 Jan 2016 05:34:59 -0800 (PST) +Received: from localhost (disaster-area.hh.sledj.net [local]) + by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 5661bf40 + for ; Fri, 15 Jan 2016 13:34:58 +0000 (UTC) +From: David Edmondson +To: notmuch@notmuchmail.org +Subject: [RFC][PATCH v1] Allow content preference based on message content. +Date: Fri, 15 Jan 2016 13:34:57 +0000 +Message-Id: <1452864898-9719-1-git-send-email-dme@dme.org> +X-Mailer: git-send-email 2.6.3 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 15 Jan 2016 13:35:06 -0000 + + +Previously in #notmuch we discussed how it would be convenient to +control part preferences on the basis of message attributes. This +patch is an attempt to provide that. + +My own setting for `notmuch-multipart/alternative-discouraged' is: + +(setq notmuch-multipart/alternative-discouraged + '(cond + ((string-match "9195404@capita-intouch.co.uk" from) + '("text/plain")) + (t + '("text/html" "multipart/related")))) + +That is, discourage text/plain and multipart/related unless the +message is sent from 9195404@capita-intouch.co.uk, in which case +discourage text/plain (which for this sender is always another copy of +the HTML content, as HTML). + +David Edmondson (1): + emacs: Allow part preferences to depend on message content. + + emacs/notmuch-lib.el | 39 +++++++++++++++++++++++++++++++++++---- + emacs/notmuch-mua.el | 2 +- + emacs/notmuch-show.el | 2 +- + 3 files changed, 37 insertions(+), 6 deletions(-) + +-- +2.2.0 +