GNU bug report logs - #6362
Emacs command `dired-isearch-filenames-regexp' cause CPU usage 100%

Previous Next

Package: emacs;

Reported by: Li Zhai <mrzhaili <at> gmail.com>

Date: Sun, 6 Jun 2010 03:37:01 UTC

Severity: normal

Found in version 23.2.1

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 6362 <at> debbugs.gnu.org (full text, mbox):

From: Li Zhai <mrzhaili <at> gmail.com>
To: Juri Linkov <juri <at> jurta.org>
Cc: 6362 <at> debbugs.gnu.org
Subject: Re: bug#6362: Emacs command `dired-isearch-filenames-regexp' cause 
	CPU usage 100%
Date: Sun, 6 Jun 2010 20:30:42 +0800
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.

It's just my random thought. At most times, a white-space can solve my
problem, like `dired-isearch-filenames-regexp RET SPC f  RET'.

On Sun, Jun 6, 2010 at 5:54 PM, Juri Linkov <juri <at> jurta.org> wrote:
>> I use the command `dired-isearch-filenames-regexp' to find some files
>> in a directory. I use the the anchor `^' to match the files start with
>> something. Emacs is suspended and the CPU usage is 100%.Here is a
>> transcript:
>>
>> 1. Open a directory in dired mode.
>> 2. Input `M-x dired-isearch-filenames-regexp RET  ^ f RET'
>>
>> Emacs will suspend rather than match the file names start with `f'.
>
> Thanks for the report.  I fixed looping in lazy-highlighting.
> Now the loop in `isearch-lazy-highlight-search' is exactly like
> in `isearch-search' that checks for the empty match (and
> `isearch-lazy-highlight-update' takes care about forwarding
> point to the next character in this case).
>
> As for implementing matching at the beginning of file names with `^',
> it seems this is not possible to do.  `re-search-forward' matches only
> at the beginning of a line, not in the middle of a line.
>
> You can observe the same problem with query-replace in wdired.
> For instance, type:
>
> 1. M-x wdired-change-to-wdired-mode RET
> 2. M-x query-replace-regexp RET ^f RET replacement RET
>
> Do you expect that query-replace will rename file names
> that start with `f'?
>
> --
> Juri Linkov
> http://www.jurta.org/emacs/
>




This bug report was last modified 13 years and 260 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.