From: Juri Linkov <juri@jurta.org>
To: Li Zhai <mrzhaili@gmail.com>
Cc: 6362@debbugs.gnu.org
Subject: bug#6362: Emacs command `dired-isearch-filenames-regexp' cause CPU usage 100%
Date: Sun, 06 Jun 2010 12:54:55 +0300 [thread overview]
Message-ID: <87d3w4lc3r.fsf@mail.jurta.org> (raw)
In-Reply-To: <AANLkTimmLm2DmB3GfpX8_twUz7cSKkDClPii_EP692dg@mail.gmail.com> (Li Zhai's message of "Sun, 6 Jun 2010 11:36:00 +0800")
> 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/
next prev parent reply other threads:[~2010-06-06 9:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-06 3:36 bug#6362: Emacs command `dired-isearch-filenames-regexp' cause CPU usage 100% Li Zhai
2010-06-06 9:54 ` Juri Linkov [this message]
2010-06-06 12:30 ` Li Zhai
2010-06-07 18:05 ` Juri Linkov
2010-06-07 18:09 ` Juri Linkov
2011-09-09 15:49 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d3w4lc3r.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=6362@debbugs.gnu.org \
--cc=mrzhaili@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).