[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length'
From: |
Eli Zaretskii |
Subject: |
bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length' |
Date: |
Mon, 20 Nov 2023 14:10:23 +0200 |
> From: Liu Hui <liuhui1610@gmail.com>
> Date: Mon, 20 Nov 2023 12:34:13 +0800
> Cc: stefankangas@gmail.com, monnier@iro.umontreal.ca, 67161@debbugs.gnu.org
>
> > > BTW, I just find isearch doesn't handle hidden filenames based on
> > > 'invisible' text property, which needs to be fixed. So maybe an
> > > overlay-based approach is better? though I don't know if there is any
> > > possible problem with using overlays for this feature. WDYT?
> >
> > Doesn't "M-s i" during isearch handle this?
>
> No. I want to search text in hidden part rather than only in the
> visible part, which is necessary for users to find relevant files even
> if they are partly hidden.
>
> Here is an example illustrating the problem:
> 1. emacs -Q
> 2. type M-: (insert "visible " (propertize "hidden" 'invisible t))
> 3. C-s hidden
>
> isearch fails to match the invisible text by default, unless
> search-invisible is changed to t. However, the default value of
> search-invisible is open and it cannot be changed to t during isearch
> by M-s i.
>
> Therefore, I would like to change
>
> (put-text-property ell-beg (point) 'invisible 'dired-filename-hide)
>
> to
>
> (let ((ov (make-overlay ell-beg (point))))
> (overlay-put ov 'invisible 'dired-filename-hide)
> (overlay-put ov 'isearch-open-invisible t)
> (overlay-put ov 'evaporate t))
>
> 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.
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'?
Or maybe 'open' should also search inside text properties, not just
overlays? In any case, the differences between properties and
overlays is unusual and IMO a misfeature. Can this be fixed?
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Liu Hui, 2023/11/14
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Eli Zaretskii, 2023/11/14
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Liu Hui, 2023/11/15
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Eli Zaretskii, 2023/11/15
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Liu Hui, 2023/11/16
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Eli Zaretskii, 2023/11/16
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Liu Hui, 2023/11/18
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Eli Zaretskii, 2023/11/18
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Drew Adams, 2023/11/18
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Liu Hui, 2023/11/19
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length',
Eli Zaretskii <=
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Juri Linkov, 2023/11/20
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Eli Zaretskii, 2023/11/20
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Stefan Monnier, 2023/11/20
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Eli Zaretskii, 2023/11/20
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Juri Linkov, 2023/11/21
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Eli Zaretskii, 2023/11/21
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Juri Linkov, 2023/11/21
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Drew Adams, 2023/11/20
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Liu Hui, 2023/11/22
- bug#67161: 30.0.50; [PATCH] Add option `dired-filename-display-length', Eli Zaretskii, 2023/11/25