Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id F11B14196F3 for ; Fri, 23 Apr 2010 10:39:40 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nUbQKz+Yz2HJ for ; Fri, 23 Apr 2010 10:39:40 -0700 (PDT) Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com [74.125.82.181]) by olra.theworths.org (Postfix) with ESMTP id D2E55431FC1 for ; Fri, 23 Apr 2010 10:39:39 -0700 (PDT) Received: by wyf23 with SMTP id 23so1637753wyf.26 for ; Fri, 23 Apr 2010 10:39:39 -0700 (PDT) Received: by 10.216.86.71 with SMTP id v49mr562143wee.14.1272044378917; Fri, 23 Apr 2010 10:39:38 -0700 (PDT) Received: from ut.hh.sledj.net (gmp-ea-fw-1.sun.com [192.18.1.36]) by mx.google.com with ESMTPS id x1sm202004wbx.13.2010.04.23.10.39.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 23 Apr 2010 10:39:37 -0700 (PDT) Received: by ut.hh.sledj.net (Postfix, from userid 1000) id C5789594135; Fri, 23 Apr 2010 18:39:37 +0100 (BST) From: David Edmondson To: notmuch@notmuchmail.org Subject: [PATCH] emacs: Fix i-search to open up invisible citations as necessary Date: Fri, 23 Apr 2010 18:39:33 +0100 Message-Id: <1272044373-26184-1-git-send-email-dme@dme.org> X-Mailer: git-send-email 1.7.0 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Apr 2010 17:39:41 -0000 Add an `isearch-open-invisible' property to the overlays used to hide citations and signatures, together with an appropriate function to leave the invisible text visible should that be required. --- emacs/notmuch-wash.el | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el index fe33819..dd5d0a1 100644 --- a/emacs/notmuch-wash.el +++ b/emacs/notmuch-wash.el @@ -83,6 +83,9 @@ collapse the remaining lines into a button.") 'help-echo "mouse-1, RET: Show signature" :supertype 'notmuch-wash-button-invisibility-toggle-type) +(defun notmuch-wash-region-isearch-show (overlay) + (remove-from-invisibility-spec (overlay-get overlay 'invisible))) + (defun notmuch-wash-region-to-button (beg end type prefix button-text) "Auxilary function to do the actual making of overlays and buttons @@ -102,6 +105,7 @@ is what to put on the button." type "-toggle-type")))) (add-to-invisibility-spec invis-spec) (overlay-put overlay 'invisible invis-spec) + (overlay-put overlay 'isearch-open-invisible #'notmuch-wash-region-isearch-show) (goto-char (1+ end)) (save-excursion (goto-char (1- beg)) -- 1.7.0