unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Liu Hui <liuhui1610@gmail.com>, Eli Zaretskii <eliz@gnu.org>,
	67161@debbugs.gnu.org, stefankangas@gmail.com
Subject: bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length'
Date: Tue, 21 Nov 2023 09:52:02 +0200	[thread overview]
Message-ID: <86v89v1qrd.fsf@mail.linkov.net> (raw)
In-Reply-To: <jwv34x0xnsv.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 20 Nov 2023 13:55:58 -0500")

>>> in the attached patch, then text in hidden part can be matched
>>> regardless of search-invisible being open or t. It also has a bonus
>>> that hidden text can be revealed during isearch.
>
> Yes, using an overlay sounds like a better choice here, thanks.
>
>> Juri, this seems to be a usability bug?  Why does Isearch only look
>> into invisible overlay properties, but not text properties?  IOW, why
>> doesn't "M-s i" set the value of isearch-invisible to t, not 'open'?
>
> I think the idea is that matching invisible text is somewhat
> inconvenient, so it's better to temporarily reveal/open that text.
> But I think it points to an bug in Isearch: when `isearch-invisible` is
> `open` we should match text inside invisible text, regardless if we can
> reveal/open that invisible text or not.  IOW `open` should find the
> same matches as `t`, the only difference being that it additionally
> (tries to) reveal/open the text.

This could be a new value like `open-or-match` with a trivial change:

@@ -3899,6 +3899,9 @@ isearch-filter-visible
 of what `isearch-range-invisible' says."
   (and (not (text-property-not-all beg end 'inhibit-isearch nil))
        (or (eq search-invisible t)
+           (when (eq search-invisible 'open-or-match)
+             (isearch-range-invisible beg end)
+             t)
            (not (isearch-range-invisible beg end)))))

But I doubt that it could be enabled by default because in many cases
it's too confusing for users to stop at a match that is not visible.

OTOH, there was a request about informing the user about hidden matches.
So now the Isearch prompt shows the number of invisible matches.
Having this information the user can reveal in some way and visually
inspect these matches.

>> In any case, the differences between properties and
>> overlays is unusual and IMO a misfeature.  Can this be fixed?
>
> Indeed, it would be good to implement some way to reveal/open invisible
> text made invisible via text-properties rather than overlays.
> That also applies to `reveal-mode`, of course.

Would be nice to have such useful feature.





  parent reply	other threads:[~2023-11-21  7:52 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14  9:52 bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length' Liu Hui
2023-11-14 13:26 ` Eli Zaretskii
2023-11-15 10:04   ` Liu Hui
2023-11-15 12:32     ` Eli Zaretskii
2023-11-16 10:07       ` Liu Hui
2023-11-16 12:11         ` Eli Zaretskii
2023-11-18  9:23           ` Liu Hui
2023-11-18 10:55             ` Eli Zaretskii
2023-11-18 16:12               ` Drew Adams
2023-11-20  4:34               ` Liu Hui
2023-11-20 12:10                 ` Eli Zaretskii
2023-11-20 17:54                   ` Juri Linkov
2023-11-20 18:42                     ` Eli Zaretskii
2023-11-20 18:55                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-20 19:17                     ` Eli Zaretskii
2023-11-21  7:52                     ` Juri Linkov [this message]
2023-11-21 11:55                       ` Eli Zaretskii
2023-11-21 17:12                         ` Juri Linkov
2023-11-20 17:20                 ` Drew Adams
2023-11-22  5:41                 ` Liu Hui
2023-11-25 10:52                   ` Eli Zaretskii
2023-11-25 17:51                     ` Juri Linkov
2023-11-25 20:02                       ` Eli Zaretskii
2023-11-26  2:56                         ` Liu Hui
2023-11-26  5:59                           ` Eli Zaretskii
2023-11-26 10:49                             ` Eli Zaretskii
2023-11-26 14:03                             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-26 14:53                               ` Eli Zaretskii
2023-11-26 17:08                                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-26 17:58                                   ` Eli Zaretskii
2023-11-26 18:06                                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-27  7:19                           ` Juri Linkov
2023-11-27  8:32                             ` Liu Hui
2023-11-27 17:16                               ` Juri Linkov
2023-11-15 18:06     ` Drew Adams
2023-11-15 15:54 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-16  3:44   ` Liu Hui

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=86v89v1qrd.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=67161@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=liuhui1610@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    --cc=stefankangas@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).