mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-23 01:44:52 +01:00
emacs: Fix i-search to open up invisible citations as necessary
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.
This commit is contained in:
parent
138fd38afe
commit
7c5f017a30
1 changed files with 4 additions and 0 deletions
|
@ -77,6 +77,9 @@ collapse the remaining lines into a button.")
|
||||||
'help-echo "mouse-1, RET: Show signature"
|
'help-echo "mouse-1, RET: Show signature"
|
||||||
:supertype 'notmuch-wash-button-invisibility-toggle-type)
|
: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)
|
(defun notmuch-wash-region-to-button (beg end type prefix button-text)
|
||||||
"Auxilary function to do the actual making of overlays and buttons
|
"Auxilary function to do the actual making of overlays and buttons
|
||||||
|
|
||||||
|
@ -96,6 +99,7 @@ is what to put on the button."
|
||||||
type "-toggle-type"))))
|
type "-toggle-type"))))
|
||||||
(add-to-invisibility-spec invis-spec)
|
(add-to-invisibility-spec invis-spec)
|
||||||
(overlay-put overlay 'invisible invis-spec)
|
(overlay-put overlay 'invisible invis-spec)
|
||||||
|
(overlay-put overlay 'isearch-open-invisible #'notmuch-wash-region-isearch-show)
|
||||||
(goto-char (1+ end))
|
(goto-char (1+ end))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (1- beg))
|
(goto-char (1- beg))
|
||||||
|
|
Loading…
Reference in a new issue