|
From: | Stefan Monnier |
Subject: | bug#14013: 24.3.50; dired-isearch-filenames-regexp is matching text outside filenames |
Date: | Mon, 14 Feb 2022 07:59:54 -0500 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
> To implement ^, I see no way other than special handling: > when a regexp begins with ^, then after removing ^ from the regexp, > call 'looking-at' at the beginning of the file name. I don't know if we want to handle ^ specially, but if we do we can use something like: (while (string-match "\\^" RE i) (setq i (match-end 0)) (if (not (subregexp-context-p RE (match-beginning 0))) ;; The ^ is inside a char-range or escaped or something. nil (setq RE (replace-match (concat "\\(?:" directory-listing-before-filename-regexp "\\)") t t RE)))) -- Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |