--- /dev/null
+Return-Path: <markwalters1009@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 09DDC431FBC\r
+ for <notmuch@notmuchmail.org>; Tue, 18 Dec 2012 11:28:20 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+ RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id eli1Y5WHE4ja for <notmuch@notmuchmail.org>;\r
+ Tue, 18 Dec 2012 11:28:18 -0800 (PST)\r
+Received: from mail-we0-f176.google.com (mail-we0-f176.google.com\r
+ [74.125.82.176]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 27C66431FBD\r
+ for <notmuch@notmuchmail.org>; Tue, 18 Dec 2012 11:28:14 -0800 (PST)\r
+Received: by mail-we0-f176.google.com with SMTP id r5so491422wey.21\r
+ for <notmuch@notmuchmail.org>; Tue, 18 Dec 2012 11:28:11 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to\r
+ :references; bh=BAWRiQrBmfRc0j+WJj8WlAptrQN9s42o9FHvwBqGxrY=;\r
+ b=0cM/EQRKWLmUspcNmvK3ECTDJZwwojsF7vuHGGHXkthcs3SiLi/EZfgTaK9E7Yhii3\r
+ kBgxiLKOtezAXO6UebiXDkeq2p2Qh6QCRfCjdp3k/HH4CrGWUNDYVlyKNWQtCsLN1udH\r
+ x5kdhEFzggIH/nAMDtzSkA4AIBnQuqeayyFk3me8Av3H/IwiYDNPgWjcBabakBxMrHJP\r
+ VJ0fyV2ZLW3oOBf9exbv4CaaPPXX6z7Uor+IgKkkdoCSbign00xwxmk8i2cfkeYUkCzn\r
+ 81JUZK1wQMDaFQWrnol1PY8huFUt4zdkrv60xCiDydsY2FSRM0OGZ1vCk8uF6kuUrFlq\r
+ 0pJA==\r
+X-Received: by 10.194.93.40 with SMTP id cr8mr6802149wjb.16.1355858891618;\r
+ Tue, 18 Dec 2012 11:28:11 -0800 (PST)\r
+Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
+ by mx.google.com with ESMTPS id i6sm17169739wix.5.2012.12.18.11.28.10\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Tue, 18 Dec 2012 11:28:10 -0800 (PST)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v5 1/4] emacs: show: modify insert-part-header to save the\r
+ button text\r
+Date: Tue, 18 Dec 2012 19:27:57 +0000\r
+Message-Id: <1355858880-16329-2-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\r
+In-Reply-To: <1355858880-16329-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1355858880-16329-1-git-send-email-markwalters1009@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 18 Dec 2012 19:28:20 -0000\r
+\r
+This just make notmuch-show-insert-part-header save the basic button\r
+text for parts as an attribute. This makes it simpler for the button\r
+action (added in a later patch) to reword the label as appropriate (eg\r
+append "(not shown)" or not as appropriate).\r
+---\r
+ emacs/notmuch-show.el | 18 +++++++++---------\r
+ 1 files changed, 9 insertions(+), 9 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 4bdd5af..5248fba 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -483,17 +483,17 @@ message at DEPTH in the current thread."\r
+ (fset 'notmuch-show-part-button-map notmuch-show-part-button-map)\r
+ \r
+ (defun notmuch-show-insert-part-header (nth content-type declared-type &optional name comment)\r
+- (let ((button))\r
++ (let ((button)\r
++ (base-label (concat (when name (concat name ": "))\r
++ declared-type\r
++ (unless (string-equal declared-type content-type)\r
++ (concat " (as " content-type ")"))\r
++ comment)))\r
++\r
+ (setq button\r
+ (insert-button\r
+- (concat "[ "\r
+- (if name (concat name ": ") "")\r
+- declared-type\r
+- (if (not (string-equal declared-type content-type))\r
+- (concat " (as " content-type ")")\r
+- "")\r
+- (or comment "")\r
+- " ]")\r
++ (concat "[ " base-label " ]")\r
++ :base-label base-label\r
+ :type 'notmuch-show-part-button-type\r
+ :notmuch-part nth\r
+ :notmuch-filename name\r
+-- \r
+1.7.9.1\r
+\r