Subject: bug#1848: 23.0.60; isearch-forward fails to find colon characters in Info buffers

From: Juri Linkov <[email-masked]>
Date: Wed, 14 Jan 2009 03:04:45 +0200

>>> > I found it a bit confusing that setting search-invisible to t makes no
>>> > difference to the behaviour here. Should Info-search-success-function
>>> > respect search-invisible?
>>>
>>> I'd say yes.  Does anyone object?
>
>> I don't object, but wouldn't it be confusing to have it "find" the
>> colon, without the colon being visible?  Perhaps we should make it
>> temporarily visible?
>
> Oh, yes, definitely.  If we can't temporarily show the invisible text,
> then we shouldn't obey (eq search-invisible 'open), but we should still
> obey (eq search-invisible t).

Then the following patch does this.  It checks only for
(eq search-invisible t), not for 'open.

BTW, I'm not sure if we should also skip the breadcrumbs line.
I currently have no problems with the search matching at the
breadcrumbs line.  So maybe we should wait for a request
from someone who has a problem with breadcrumbs.

Index: lisp/info.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/info.el,v
retrieving revision 1.557
diff -c -w -b -r1.557 info.el
*** lisp/info.el	10 Jan 2009 10:42:08 -0000	1.557
--- lisp/info.el	14 Jan 2009 00:59:59 -0000
***************
*** 1868,1878 ****
      (let ((backward (< found beg-found)))
        (not
         (or
  	(if backward
  	    (or (text-property-not-all found beg-found 'invisible nil)
  		(text-property-not-all found beg-found 'display nil))
  	  (or (text-property-not-all beg-found found 'invisible nil)
! 	      (text-property-not-all beg-found found 'display nil)))
  	;; Skip node header line
  	(and (save-excursion (forward-line -1)
  			     (looking-at "\^_"))
--- 1868,1879 ----
      (let ((backward (< found beg-found)))
        (not
         (or
+ 	(and (not (eq search-invisible t))
  	     (if backward
  		 (or (text-property-not-all found beg-found 'invisible nil)
  		     (text-property-not-all found beg-found 'display nil))
  	       (or (text-property-not-all beg-found found 'invisible nil)
! 		   (text-property-not-all beg-found found 'display nil))))
  	;; Skip node header line
  	(and (save-excursion (forward-line -1)
  			     (looking-at "\^_"))

-- 
Juri Linkov
http://www.jurta.org/emacs/