all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Juri Linkov <juri@linkov.net>
Cc: 55768@debbugs.gnu.org, Thierry EMERY <thierryalemery@gmail.com>
Subject: bug#55768: 26.3; isearch highlighting in dired
Date: Tue, 28 Jun 2022 19:22:18 +0200	[thread overview]
Message-ID: <87y1xgn1o5.fsf@gnus.org> (raw)
In-Reply-To: <86tu84ohjw.fsf@mail.linkov.net> (Juri Linkov's message of "Tue,  28 Jun 2022 19:53:55 +0300")

Juri Linkov <juri@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





  reply	other threads:[~2022-06-28 17:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-02 15:22 bug#55768: 26.3; isearch highlighting in dired Thierry EMERY
2022-06-03  3:31 ` Lars Ingebrigtsen
2022-06-03  7:23   ` Thierry EMERY
2022-06-03  7:42     ` Thierry EMERY
2022-06-04 11:24     ` Lars Ingebrigtsen
2022-06-28 16:53       ` Juri Linkov
2022-06-28 17:22         ` Lars Ingebrigtsen [this message]
2022-06-28 17:37           ` Juri Linkov
2022-06-29  9:56             ` Lars Ingebrigtsen
2022-06-29 17:58               ` Juri Linkov
2022-06-30  9:30                 ` Lars Ingebrigtsen
2022-06-30 14:37                   ` Thierry EMERY
2022-06-30 14:56                     ` Lars Ingebrigtsen
2022-06-03  7:55   ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y1xgn1o5.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=55768@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=thierryalemery@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.