Subject: bug#20092: 24.4.91; False matches with incremental search in Info

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 25 Aug 2020 11:40:37 +0200

Juri Linkov <[email-masked]> writes:

> Since Info doesn't open invisible text, then maybe `Info-mode' should
> set the buffer-local value of `search-invisible' to nil?
>
> diff --git a/lisp/info.el b/lisp/info.el

[...]

> +  (setq-local search-invisible nil)

Makes sense to me, but this was never applied?

>> I'm not sure what's the best and/or simplest way to fix it.
>> Maybe a first step would be to emit a message explaining that the match
>> is inside hidden text (at least so the user gets a clue about what's
>> going on).

[...]

> Or maybe better in the message suffix?
>
> diff --git a/lisp/isearch.el b/lisp/isearch.el
> index 191ec82..4bc2129 100644
> --- a/lisp/isearch.el
> +++ b/lisp/isearch.el
> @@ -2544,6 +2545,7 @@ (defun isearch-message-suffix (&optional c-q-hack)
>  	  (if isearch-error
>  	      (concat " [" isearch-error "]")
>  	    "")
> +	  (if isearch-hidden " [hidden]" "")
>  	  (or isearch-message-suffix-add "")))

I think that would be a good idea, but I tried the patch, and I could
never get it to actually show the [hidden] suffix.  I tried debugging
this, but...  it seems like isearch-hidden is never set?  At least not
in my test cases here?  Is there another bug in this area?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no