GNU bug report logs -
#25905
25.1; Can't find regexp and replace in SVG files
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
>>> There is also the dired-do-isearch command that searches in marked files.
>>>
>>> OTOH, when such "making text visible to search" would be implemented
>>> for isearch, then it will be used automatically by query-replace that
>>> relies on the same search functions.
>>
>> That's true...
>>
>> So we basically need some new functionality for switching to text mode
>> in image buffers when we're doing searches?
>
> Maybe isearch-open-necessary-overlays should detect if there is an image
> over point, then switch the buffer to text mode.
Here is one possible fix, but I'm still unsure if using image functions
in isearch is a good style. Perhaps a better fix would be to add this
code to a buffer-local isearch-mode-hook in image-mode.el that runs
when isearch starts.
[inside-image.patch (text/x-diff, inline)]
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 0d5c480c8d..12d31d49a7 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -3573,6 +3573,11 @@ isearch-close-unnecessary-overlays
(defun isearch-range-invisible (beg end)
"Return t if all the text from BEG to END is invisible."
+ (let ((inside-image (and (derived-mode-p 'image-mode)
+ (fboundp 'image-get-display-property)
+ (image-get-display-property))))
+ (when (and inside-image (fboundp 'image-mode-as-text))
+ (image-mode-as-text)))
(when (/= beg end)
;; Check that invisibility runs up to END.
(save-excursion
This bug report was last modified 4 years and 229 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.