Re: [PATCH 9/9] add has: query prefix to search for specific properties
[notmuch-archives.git] / 87 / 535bccf106f737e0de90b47d52727d482fb10f
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 B719A431FBF\r
6         for <notmuch@notmuchmail.org>; Mon,  6 Feb 2012 07:39:16 -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 dqBt5ZwrZEaj for <notmuch@notmuchmail.org>;\r
16         Mon,  6 Feb 2012 07:39:16 -0800 (PST)\r
17 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com\r
18         [209.85.212.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 D5302431FAE\r
21         for <notmuch@notmuchmail.org>; Mon,  6 Feb 2012 07:39:15 -0800 (PST)\r
22 Received: by wibhi8 with SMTP id hi8so4927727wib.26\r
23         for <notmuch@notmuchmail.org>; Mon, 06 Feb 2012 07:39:13 -0800 (PST)\r
24 Received: by 10.180.92.229 with SMTP id cp5mr11094796wib.8.1328542752991;\r
25         Mon, 06 Feb 2012 07:39:12 -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 y1sm47465370wiw.6.2012.02.06.07.39.10\r
29         (version=TLSv1/SSLv3 cipher=OTHER);\r
30         Mon, 06 Feb 2012 07:39:11 -0800 (PST)\r
31 Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)\r
32         id 53BC3A0E85; Mon,  6 Feb 2012 15:39:09 +0000 (GMT)\r
33 From: David Edmondson <dme@dme.org>\r
34 To: notmuch@notmuchmail.org\r
35 Subject: [PATCH v3 3/3] emacs: Don't insert a part header if it's the first\r
36         part and text/*.\r
37 Date: Mon,  6 Feb 2012 15:39:08 +0000\r
38 Message-Id: <1328542748-19530-5-git-send-email-dme@dme.org>\r
39 X-Mailer: git-send-email 1.7.8.3\r
40 In-Reply-To: <1328542748-19530-1-git-send-email-dme@dme.org>\r
41 References: <1327052612-1040-1-git-send-email-dme@dme.org>\r
42         <1328542748-19530-1-git-send-email-dme@dme.org>\r
43 X-BeenThere: notmuch@notmuchmail.org\r
44 X-Mailman-Version: 2.1.13\r
45 Precedence: list\r
46 List-Id: "Use and development of the notmuch mail system."\r
47         <notmuch.notmuchmail.org>\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
51 List-Post: <mailto:notmuch@notmuchmail.org>\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
55 X-List-Received-Date: Mon, 06 Feb 2012 15:39:16 -0000\r
56 \r
57 Previously this logic applied only to text/plain. Allow it for other\r
58 text/* parts as well.\r
59 ---\r
60  emacs/notmuch-show.el |    9 ++++-----\r
61  1 files changed, 4 insertions(+), 5 deletions(-)\r
62 \r
63 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
64 index ce79762..c60e613 100644\r
65 --- a/emacs/notmuch-show.el\r
66 +++ b/emacs/notmuch-show.el\r
67 @@ -412,7 +412,9 @@ CONTENT-TYPE parts."\r
68  (defun notmuch-show-insert-part-header (nth content-type declared-type\r
69                                             &optional name comment\r
70                                             &rest button-parameters)\r
71 -  (unless (notmuch-show-hidden-part-header content-type)\r
72 +  (unless (or (notmuch-show-hidden-part-header content-type)\r
73 +             (and (= nth 1)\r
74 +                  (string-match "text/*" content-type)))\r
75      (apply #'insert-button\r
76            (concat "[ "\r
77                    (if name (concat name ": ") "")\r
78 @@ -703,10 +705,7 @@ current buffer, if possible."\r
79  \r
80  (defun notmuch-show-insert-part-text/plain (msg part content-type nth depth declared-type)\r
81    (let ((start (point)))\r
82 -    ;; If this text/plain part is not the first part in the message,\r
83 -    ;; insert a header to make this clear.\r
84 -    (if (> nth 1)\r
85 -       (notmuch-show-insert-part-header nth declared-type content-type (plist-get part :filename)))\r
86 +    (notmuch-show-insert-part-header nth declared-type content-type (plist-get part :filename))\r
87      (insert (notmuch-show-get-bodypart-content msg part nth))\r
88      (save-excursion\r
89        (save-restriction\r
90 -- \r
91 1.7.8.3\r
92 \r