[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching text outs
From: |
Juri Linkov |
Subject: |
bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching text outside filenames |
Date: |
Tue, 08 Feb 2022 21:32:44 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
forcemerge 14013 29215
thanks
> Michael Heerdegen <michael_heerdegen@web.de> writes:
>
>> Right, thanks. Now I'm beginning to understand how this code works.
>
> BTW, one (related) thing that I found problematic over the time: I like
> to use query-replace on file names in WDired. There is no way to match
> the beginning of the file name - right? That's sometimes a problem. In
> this situation it is even better to use dired-isearch-filenames -> nil
> because then I can match the space character before the beginning of the
> file name.
Like was discussed in bug#53758, xref uses ".*" to replace in results
where search/replace should be performed only within boundaries of matches.
xref uses own search function:
(replace-re-search-function
(lambda (from &optional _bound noerror)
(let (found pair)
(while (and (not found) pairs)
(setq pair (pop pairs)
current-beg (car pair)
current-end (cdr pair))
(goto-char current-beg)
(when (re-search-forward from current-end noerror)
(setq found t)))
found)))
So maybe Dired/WDired could use a similar function.
But in any case it seems matching at the beginning of the file name with "^"
as also requested by Drew in bug#29215 (merged) is still impossible.
- bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching text outside filenames,
Juri Linkov <=
- bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching text outside filenames, Juri Linkov, 2022/02/13
- bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching text outside filenames, Michael Heerdegen, 2022/02/14
- bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching text outside filenames, Juri Linkov, 2022/02/15
- bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching text outside filenames, Michael Heerdegen, 2022/02/15
- bug#14013: [External] : bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching text outside filenames, Drew Adams, 2022/02/15