Subject: Re: bug#64178: replace-regexp ignoring value of org-search-invisible

From: Juri Linkov <[email-masked]>
Date: Thu, 22 Jun 2023 09:50:39 +0300

>> Of course. My use case is that I wish specifically to append some text to
>> some lines. The way I normally do this would be to search for the regex
>> end-of-line ($) and replace with some text. E.g. in order to append the
>> word foo to the end of a line I would do one of:
>>
>> :s/$/ foo/ <RET>
>> M-x regexp-replace RET $ RET  foo
>
> Ok. Then, it is not an Org mode bug.

Actually, Isearch never supported zero-length invisible matches.
The following condition was in isearch.el since day 1:

  (defun isearch-range-invisible (beg end)
    "Return t if all the text from BEG to END is invisible."
    (when (/= beg end)

So any zero-length match is deemed visible by Isearch.