Subject: bug#6362: Emacs command `dired-isearch-filenames-regexp' cause CPU usage 100%

From: Juri Linkov <[email-masked]>
Date: Mon, 07 Jun 2010 21:05:09 +0300

> Yes, I expect that query-replace will rename file names start with
> `f'. As the search process just matched the file names, it is a simple
> thought that `^' means the beginning of the file name.
>
> If we could add some special syntax properties to the white-space
> before the file name, it is possible to match the file names start
> with `f'. For instance, type :
>
> dired-isearch-filenames-regexp RET \sxf  RET
>
> At here, the `x' means the special syntax class.

`\sx' matches a character, but it would be better to match the empty string
like `^' does.

One variant is to narrow the dired buffer so the beginning of a line
will be the beginning of a file name.  Unfortunately, it's impossible
to narrow to columns, only to lines.

Another variant is to add a new predicate function in regex.c
that will specify where ^ should match, so dired will set it
to a function that returns non-nil at the beginning of a file name.

-- 
Juri Linkov
http://www.jurta.org/emacs/