1 Return-Path: <dmitry.kurochkin@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 7201E429E50
\r
6 for <notmuch@notmuchmail.org>; Wed, 25 May 2011 15:10:25 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id bKf9xc6RwFsO for <notmuch@notmuchmail.org>;
\r
17 Wed, 25 May 2011 15:10:23 -0700 (PDT)
\r
18 Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com
\r
19 [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id E7B0A429E47
\r
22 for <notmuch@notmuchmail.org>; Wed, 25 May 2011 15:10:19 -0700 (PDT)
\r
23 Received: by mail-fx0-f53.google.com with SMTP id 8so217139fxm.26
\r
24 for <notmuch@notmuchmail.org>; Wed, 25 May 2011 15:10:19 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
26 h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer
\r
27 :in-reply-to:references;
\r
28 bh=SUqsr2PZ54+4OFQA4U0jC9+4gUE7loqubWtdQ9cJ3hI=;
\r
29 b=wgFXpPyw2wFDROL8qSRKUSh/WGX4rMzAu+3U6Nwc9SRbx1CKlOfXtXIPriYu1RNJB6
\r
30 QI9iZXHXptka41JNHr/GD4aJf7oCLcj+9HoBWgX1zVF5KulE1VEwov0LaF3F/5qj+Jhd
\r
31 oO5nxsmsEYFGQujFujYKe1ThjZdaskxGvmRF8=
\r
32 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
\r
33 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
34 b=ikaN+pHXEvX3l4zuUV5zCiwhWzJX3rnE0sm9uvxJw6Vx8iRbJLjbSPuv14qHycnPSK
\r
35 VvOGFNj1krfeGI3IkTBB3PP0HpNVUmmIGCRMeLb4PtQMwUcJcFWFlBia5PPlhlR/RDkN
\r
36 cPAbBK0yq79YezPxYg1DCfhKG0Shryka2pTbg=
\r
37 Received: by 10.223.25.201 with SMTP id a9mr90080fac.141.1306361419625;
\r
38 Wed, 25 May 2011 15:10:19 -0700 (PDT)
\r
39 Received: from localhost ([91.144.186.21])
\r
40 by mx.google.com with ESMTPS id g8sm31681fai.44.2011.05.25.15.10.18
\r
41 (version=TLSv1/SSLv3 cipher=OTHER);
\r
42 Wed, 25 May 2011 15:10:19 -0700 (PDT)
\r
43 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
44 To: notmuch@notmuchmail.org
\r
45 Subject: [PATCH 4/5] Set higher priority for headers and hidden citation
\r
47 Date: Thu, 26 May 2011 02:10:15 +0400
\r
48 Message-Id: <1306361416-5019-5-git-send-email-dmitry.kurochkin@gmail.com>
\r
49 X-Mailer: git-send-email 1.7.5.1
\r
50 In-Reply-To: <1306361416-5019-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
51 References: <1306361416-5019-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
52 X-BeenThere: notmuch@notmuchmail.org
\r
53 X-Mailman-Version: 2.1.13
\r
55 List-Id: "Use and development of the notmuch mail system."
\r
56 <notmuch.notmuchmail.org>
\r
57 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
58 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
59 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
60 List-Post: <mailto:notmuch@notmuchmail.org>
\r
61 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
62 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
64 X-List-Received-Date: Wed, 25 May 2011 22:10:25 -0000
\r
66 Before the patch, message, headers and hidden citation overlays
\r
67 had zero priority. All these overlay have `invisible' property.
\r
68 Emacs documentation says that we should not make assumptions
\r
69 about which overlay will prevail when they have the same priority
\r
70 [1]. It happens to work as we need, but we should not rely on
\r
71 undocumented behavior.
\r
73 [1] http://www.gnu.org/s/emacs/manual/html_node/elisp/Overlay-Properties.html
\r
75 emacs/notmuch-show.el | 4 +++-
\r
76 emacs/notmuch-wash.el | 1 +
\r
77 2 files changed, 4 insertions(+), 1 deletions(-)
\r
79 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
80 index 34c0b79..e1846bc 100644
\r
81 --- a/emacs/notmuch-show.el
\r
82 +++ b/emacs/notmuch-show.el
\r
83 @@ -733,7 +733,9 @@ current buffer, if possible."
\r
85 (put-text-property message-start message-end :notmuch-message-extent (cons message-start message-end))
\r
87 - (overlay-put (make-overlay headers-start headers-end) 'invisible headers-invis-spec)
\r
88 + (let ((headers-overlay (make-overlay headers-start headers-end)))
\r
89 + (overlay-put headers-overlay 'invisible headers-invis-spec)
\r
90 + (overlay-put headers-overlay 'priority 10))
\r
91 (overlay-put (make-overlay body-start body-end) 'invisible message-invis-spec)
\r
93 ;; Save the properties for this message. Currently this saves the
\r
94 diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el
\r
95 index bd521ba..992fa8f 100644
\r
96 --- a/emacs/notmuch-wash.el
\r
97 +++ b/emacs/notmuch-wash.el
\r
98 @@ -139,6 +139,7 @@ insert before the button, probably for indentation."
\r
99 (add-to-invisibility-spec invis-spec)
\r
100 (overlay-put overlay 'invisible (list invis-spec message-invis-spec))
\r
101 (overlay-put overlay 'isearch-open-invisible #'notmuch-wash-region-isearch-show)
\r
102 + (overlay-put overlay 'priority 10)
\r
103 (overlay-put overlay 'type type)
\r
104 (goto-char (1+ end))
\r