GNU bug report logs -
#55768
26.3; isearch highlighting in dired
Previous Next
Reported by: Thierry EMERY <thierryalemery <at> gmail.com>
Date: Thu, 2 Jun 2022 16:14:01 UTC
Severity: normal
Tags: moreinfo
Found in version 26.3
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #28 received at 55768 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov <juri <at> linkov.net> writes:
>>> (invisible-p (point)) has already been tested in the previous line,
>>> but it only tests that
>>> there is a text property, not actual invisibility:
>>> (defun invisible-p (pos)
>>> (get-text-property pos 'invisible))
>>
>> That's not the definition of invisible-p. It's
>>
>> DEFUN ("invisible-p", Finvisible_p, Sinvisible_p, 1, 1, 0,
>> doc: /* Non-nil if text properties at POS cause text there to
>> be currently invisible.
>
> I checked this again, and I see nothing wrong in the current implementation:
>
> (invisible-p (get-text-property (point) 'invisible))
>
> is a valid call, because the arg of ‘invisible-p’ can be the actual value
> of the ‘invisible’ text property.
The claim was that invisible-p:
>>> it only tests that there is a text property, not actual
>>> invisibility
and then there's a definition of invisible-p, which indeed only tests
that. I pointed out that that's not what invisible-p is defined as, or
what it does.
In other words, this:
;; If the following character is currently invisible,
;; skip all characters with that same `invisible' property value.
;; Do that over and over.
(while (and (< (point) end) (invisible-p (point)))
(if (invisible-p (get-text-property (point) 'invisible))
Is fine, but
(eq (invisible-p (point))
(invisible-p (get-text-property (point) 'invisible)))
is always true.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 45 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.