Re: [PATCH v2] contrib: pick: bugfix when trying to show a non-message
[notmuch-archives.git] / 39 / 2d09144786b90d1733f49c98bb2d1d74b8df4a
1 Return-Path: <alex.boterolowry@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 5AAA1431FBC\r
6         for <notmuch@notmuchmail.org>; Mon, 23 Nov 2009 23:45:12 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 Received: from olra.theworths.org ([127.0.0.1])\r
9         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
10         with ESMTP id oaYCoMvMA7sZ for <notmuch@notmuchmail.org>;\r
11         Mon, 23 Nov 2009 23:45:11 -0800 (PST)\r
12 Received: from mail-pz0-f171.google.com (mail-pz0-f171.google.com\r
13         [209.85.222.171])\r
14         by olra.theworths.org (Postfix) with ESMTP id A3DC3431FAE\r
15         for <notmuch@notmuchmail.org>; Mon, 23 Nov 2009 23:45:11 -0800 (PST)\r
16 Received: by pzk1 with SMTP id 1so4588626pzk.33\r
17         for <notmuch@notmuchmail.org>; Mon, 23 Nov 2009 23:45:10 -0800 (PST)\r
18 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
19         h=domainkey-signature:received:received:received:from:to:cc:subject\r
20         :date:message-id:x-mailer;\r
21         bh=8NWBNZ26LEs9F3fBTGqCUsNx0B6yB4MyefRY1TaixKg=;\r
22         b=xAqxJz7NwEPS6DcEOt9ZNDFQDwIytvat4Tm1Qn1SGofpjJGsbNWWwNB314D4wbLqg+\r
23         BCNlG5vExvHqS4Ca735IoBRgA9bLoqwg7An8/d6N5b+58Mcmy5q0q2qKnI/KgI/IH2rf\r
24         +/1C7KdwqNNDRwKH3tTkOeRF+nnYrjQ+6LAQY=\r
25 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
26         h=from:to:cc:subject:date:message-id:x-mailer;\r
27         b=eb+vUH2K/ztV9kz+55KipTjS3vcqEleLa75a/h8kaHAdg7HXtBNy+jRtoPjOrfSbkv\r
28         iG375oCsR8NqG62rA/vY9V/EJP+lxQMuqBwqFd/O8h54Fk+TpWoP1tq0hkzHSz/7Qt+W\r
29         Uf0e5IRzlB+jLHoNzRc8WDZ2JENjSHSKNirbQ=\r
30 Received: by 10.114.187.8 with SMTP id k8mr11321181waf.220.1259048709201;\r
31         Mon, 23 Nov 2009 23:45:09 -0800 (PST)\r
32 Received: from fortitudo (70-36-144-85.dsl.dynamic.sonic.net [70.36.144.85])\r
33         by mx.google.com with ESMTPS id 22sm3089049pxi.2.2009.11.23.23.45.08\r
34         (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
35         Mon, 23 Nov 2009 23:45:08 -0800 (PST)\r
36 Received: from alexbl (uid 1001) (envelope-from alexbl@fortitudo) id 7053\r
37         by fortitudo (DragonFly Mail Agent) Mon, 23 Nov 2009 23:45:13 -0800\r
38 From: Alexander Botero-Lowry <alex.boterolowry@gmail.com>\r
39 To: notmuch@notmuchmail.org\r
40 Date: Mon, 23 Nov 2009 23:45:03 -0800\r
41 Message-Id: <1259048707-3062-1-git-send-email-alex.boterolowry@gmail.com>\r
42 X-Mailer: git-send-email 1.6.5.2\r
43 Subject: [notmuch] [PATCH 1/5] make headers locally expandable/collapsable\r
44 X-BeenThere: notmuch@notmuchmail.org\r
45 X-Mailman-Version: 2.1.12\r
46 Precedence: list\r
47 List-Id: "Use and development of the notmuch mail system."\r
48         <notmuch.notmuchmail.org>\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
52 List-Post: <mailto:notmuch@notmuchmail.org>\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
56 X-List-Received-Date: Tue, 24 Nov 2009 07:45:13 -0000\r
57 \r
58 ---\r
59  notmuch.el |   18 +++++++++++++++---\r
60  1 files changed, 15 insertions(+), 3 deletions(-)\r
61 \r
62 diff --git a/notmuch.el b/notmuch.el\r
63 index fa6e7de..8aee286 100644\r
64 --- a/notmuch.el\r
65 +++ b/notmuch.el\r
66 @@ -605,7 +605,8 @@ which this thread was originally shown."\r
67      (end-of-line)\r
68      ; Inverse video for subject\r
69      (overlay-put (make-overlay beg (point)) 'face '(:inverse-video t))\r
70 -    (forward-line 2)\r
71 +    (forward-line 1)\r
72 +    (end-of-line)\r
73      (let ((beg-hidden (point-marker)))\r
74        (re-search-forward notmuch-show-header-end-regexp)\r
75        (beginning-of-line)\r
76 @@ -619,8 +620,19 @@ which this thread was originally shown."\r
77            (forward-line)\r
78            )\r
79         (indent-rigidly beg end depth)\r
80 -       (overlay-put (make-overlay beg-hidden end)\r
81 -                    'invisible 'notmuch-show-header)\r
82 +        (let ((invis-spec (make-symbol "notmuch-show-header")))\r
83 +          (add-to-invisibility-spec (cons invis-spec t))\r
84 +          (overlay-put (make-overlay beg-hidden end)\r
85 +                       'invisible invis-spec)\r
86 +          (goto-char beg)\r
87 +          (forward-line)\r
88 +          (let ((header-button (make-button (line-beginning-position) (line-end-position))))\r
89 +            (button-put header-button 'invisibility-spec (cons invis-spec t))\r
90 +            (button-put header-button 'action 'notmuch-toggle-invisible-action)\r
91 +            (button-put header-button 'follow-link t)\r
92 +            (button-put header-button 'help-echo\r
93 +                        "mouse-1, RET: Show headers")\r
94 +          ))\r
95          (goto-char end)\r
96          (insert "\n")\r
97         (set-marker beg nil)\r
98 -- \r
99 1.6.5.2\r
100 \r