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 F11B14196F3
\r
6 for <notmuch@notmuchmail.org>; Fri, 23 Apr 2010 10:39:40 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5
\r
12 tests=[BAYES_00=-1.9] autolearn=ham
\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 nUbQKz+Yz2HJ for <notmuch@notmuchmail.org>;
\r
16 Fri, 23 Apr 2010 10:39:40 -0700 (PDT)
\r
17 Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com
\r
19 by olra.theworths.org (Postfix) with ESMTP id D2E55431FC1
\r
20 for <notmuch@notmuchmail.org>; Fri, 23 Apr 2010 10:39:39 -0700 (PDT)
\r
21 Received: by wyf23 with SMTP id 23so1637753wyf.26
\r
22 for <notmuch@notmuchmail.org>; Fri, 23 Apr 2010 10:39:39 -0700 (PDT)
\r
23 Received: by 10.216.86.71 with SMTP id v49mr562143wee.14.1272044378917;
\r
24 Fri, 23 Apr 2010 10:39:38 -0700 (PDT)
\r
25 Received: from ut.hh.sledj.net (gmp-ea-fw-1.sun.com [192.18.1.36])
\r
26 by mx.google.com with ESMTPS id x1sm202004wbx.13.2010.04.23.10.39.37
\r
27 (version=TLSv1/SSLv3 cipher=RC4-MD5);
\r
28 Fri, 23 Apr 2010 10:39:37 -0700 (PDT)
\r
29 Received: by ut.hh.sledj.net (Postfix, from userid 1000)
\r
30 id C5789594135; Fri, 23 Apr 2010 18:39:37 +0100 (BST)
\r
31 From: David Edmondson <dme@dme.org>
\r
32 To: notmuch@notmuchmail.org
\r
33 Subject: [PATCH] emacs: Fix i-search to open up invisible citations as
\r
35 Date: Fri, 23 Apr 2010 18:39:33 +0100
\r
36 Message-Id: <1272044373-26184-1-git-send-email-dme@dme.org>
\r
37 X-Mailer: git-send-email 1.7.0
\r
38 X-BeenThere: notmuch@notmuchmail.org
\r
39 X-Mailman-Version: 2.1.13
\r
41 List-Id: "Use and development of the notmuch mail system."
\r
42 <notmuch.notmuchmail.org>
\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
44 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
46 List-Post: <mailto:notmuch@notmuchmail.org>
\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
50 X-List-Received-Date: Fri, 23 Apr 2010 17:39:41 -0000
\r
52 Add an `isearch-open-invisible' property to the overlays used to hide
\r
53 citations and signatures, together with an appropriate function to
\r
54 leave the invisible text visible should that be required.
\r
56 emacs/notmuch-wash.el | 4 ++++
\r
57 1 files changed, 4 insertions(+), 0 deletions(-)
\r
59 diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el
\r
60 index fe33819..dd5d0a1 100644
\r
61 --- a/emacs/notmuch-wash.el
\r
62 +++ b/emacs/notmuch-wash.el
\r
63 @@ -83,6 +83,9 @@ collapse the remaining lines into a button.")
\r
64 'help-echo "mouse-1, RET: Show signature"
\r
65 :supertype 'notmuch-wash-button-invisibility-toggle-type)
\r
67 +(defun notmuch-wash-region-isearch-show (overlay)
\r
68 + (remove-from-invisibility-spec (overlay-get overlay 'invisible)))
\r
70 (defun notmuch-wash-region-to-button (beg end type prefix button-text)
\r
71 "Auxilary function to do the actual making of overlays and buttons
\r
73 @@ -102,6 +105,7 @@ is what to put on the button."
\r
74 type "-toggle-type"))))
\r
75 (add-to-invisibility-spec invis-spec)
\r
76 (overlay-put overlay 'invisible invis-spec)
\r
77 + (overlay-put overlay 'isearch-open-invisible #'notmuch-wash-region-isearch-show)
\r
78 (goto-char (1+ end))
\r
80 (goto-char (1- beg))
\r