unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] emacs: Fix i-search to open up invisible citations as necessary
@ 2010-04-23 17:39 David Edmondson
  2010-04-24 14:42 ` Carl Worth
  0 siblings, 1 reply; 7+ messages in thread
From: David Edmondson @ 2010-04-23 17:39 UTC (permalink / raw)
  To: notmuch

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-05-04 10:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-23 17:39 [PATCH] emacs: Fix i-search to open up invisible citations as necessary David Edmondson
2010-04-24 14:42 ` Carl Worth
2010-04-24 16:58   ` Dirk Hohndel
2010-04-30 16:00   ` all authors and subjects in the search buffer [was: Re: [PATCH] emacs: Fix i-search to open up invisible citations as necessary] David Edmondson
2010-05-03 20:27     ` Carl Worth
2010-05-04 10:55       ` [PATCH] emacs: In search mode, truncate authors using invisible text David Edmondson
2010-05-04 10:56       ` all authors and subjects in the search buffer [was: Re: [PATCH] emacs: Fix i-search to open up invisible citations as necessary] David Edmondson

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).