[PATCH] This patch is a little finger excercise for working with git. I found a piece...
[notmuch-archives.git] / 15 / e2bf6f90c4bbbac4be25bf6b9551feac91d1cc
1 Return-Path: <markwalters1009@gmail.com>\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 886ED431FDB\r
6         for <notmuch@notmuchmail.org>; Thu, 13 Dec 2012 01:12:19 -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.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id 5mbc8wcx42X4 for <notmuch@notmuchmail.org>;\r
18         Thu, 13 Dec 2012 01:12:18 -0800 (PST)\r
19 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com\r
20         [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id A73BD431FC2\r
23         for <notmuch@notmuchmail.org>; Thu, 13 Dec 2012 01:12:13 -0800 (PST)\r
24 Received: by mail-wi0-f181.google.com with SMTP id hm9so1344991wib.2\r
25         for <notmuch@notmuchmail.org>; Thu, 13 Dec 2012 01:12:12 -0800 (PST)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
28         bh=5vb6CyBisLOmviPNatjbE5QC/29AGGUx0rviqPS9+xI=;\r
29         b=gw+ghBqG/UHMzh4zk3F+Lvualvcph79+dFPoch7QTtntcP9Bfxgz1Q4/lhLFVDJTDd\r
30         w0HTTAez2HkfFDlhuMA/OZkGE9xNjRm2nRL7CAtqojRcLHYLl8X+/owaHOAV4KSNbXsu\r
31         SA5MTckvpV9wInLFi2YPNGOHn2Aj+Qd8TR6ULS6q8/MsYG4VeomtqDgRmFEGnVHMZmTv\r
32         mck06LMkgxT9WCTdiB9bAApyzcpe4MmD1kKqUetYcWcoRbp32u2dP+dr+PgFVnIjBryI\r
33         Yre5w440Wpw2nEeRXLaU+yF8RlknaEk+LYzsURt5ZR2ypApRc7V9jf6ew9gzoGxrJu9a\r
34         ht0g==\r
35 Received: by 10.180.104.69 with SMTP id gc5mr27484195wib.13.1355389932510;\r
36         Thu, 13 Dec 2012 01:12:12 -0800 (PST)\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
38         by mx.google.com with ESMTPS id b1sm1530620wix.11.2012.12.13.01.12.10\r
39         (version=TLSv1/SSLv3 cipher=OTHER);\r
40         Thu, 13 Dec 2012 01:12:11 -0800 (PST)\r
41 From: Mark Walters <markwalters1009@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH v2 1/5] emacs: show: modify insert-part-header to save the\r
44         button text\r
45 Date: Thu, 13 Dec 2012 09:12:00 +0000\r
46 Message-Id: <1355389924-3718-2-git-send-email-markwalters1009@gmail.com>\r
47 X-Mailer: git-send-email 1.7.9.1\r
48 In-Reply-To: <1355389924-3718-1-git-send-email-markwalters1009@gmail.com>\r
49 References: <1355389924-3718-1-git-send-email-markwalters1009@gmail.com>\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Thu, 13 Dec 2012 09:12:20 -0000\r
63 \r
64 This just make notmuch-show-insert-part-header save the basic button\r
65 text for parts as an attribute. This makes it simpler for the button\r
66 action (added in a later patch) to reword the label as appropriate (eg\r
67 append "(not shown)" or not as appropriate).\r
68 ---\r
69  emacs/notmuch-show.el |   18 +++++++++---------\r
70  1 files changed, 9 insertions(+), 9 deletions(-)\r
71 \r
72 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
73 index d7fa10e..06f7ca5 100644\r
74 --- a/emacs/notmuch-show.el\r
75 +++ b/emacs/notmuch-show.el\r
76 @@ -483,17 +483,17 @@ message at DEPTH in the current thread."\r
77  (fset 'notmuch-show-part-button-map notmuch-show-part-button-map)\r
78  \r
79  (defun notmuch-show-insert-part-header (nth content-type declared-type &optional name comment)\r
80 -  (let ((button))\r
81 +  (let ((button)\r
82 +       (base-label (concat (when name (concat name ": "))\r
83 +                           declared-type\r
84 +                           (unless (string-equal declared-type content-type)\r
85 +                             (concat " (as " content-type ")"))\r
86 +                           comment)))\r
87 +\r
88      (setq button\r
89           (insert-button\r
90 -          (concat "[ "\r
91 -                  (if name (concat name ": ") "")\r
92 -                  declared-type\r
93 -                  (if (not (string-equal declared-type content-type))\r
94 -                      (concat " (as " content-type ")")\r
95 -                    "")\r
96 -                  (or comment "")\r
97 -                  " ]")\r
98 +          (concat "[ " base-label " ]")\r
99 +          :base-label base-label\r
100            :type 'notmuch-show-part-button-type\r
101            :notmuch-part nth\r
102            :notmuch-filename name\r
103 -- \r
104 1.7.9.1\r
105 \r