From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#6362: Emacs command `dired-isearch-filenames-regexp' cause CPU usage 100% Date: Sun, 06 Jun 2010 12:54:55 +0300 Organization: JURTA Message-ID: <87d3w4lc3r.fsf@mail.jurta.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1275818296 30276 80.91.229.12 (6 Jun 2010 09:58:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 6 Jun 2010 09:58:16 +0000 (UTC) Cc: 6362@debbugs.gnu.org To: Li Zhai Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 06 11:58:12 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OLCcM-0007op-QV for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Jun 2010 11:58:11 +0200 Original-Received: from localhost ([127.0.0.1]:47606 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLCcM-0000ko-9E for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Jun 2010 05:58:10 -0400 Original-Received: from [140.186.70.92] (port=38143 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLCcD-0000gt-6O for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2010 05:58:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLCcB-00028A-V5 for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2010 05:58:00 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59031) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLCcB-000286-Td for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2010 05:57:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OLCbG-0002zr-6u; Sun, 06 Jun 2010 05:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Jun 2010 09:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6362 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6362-submit@debbugs.gnu.org id=B6362.127581821411510 (code B ref 6362); Sun, 06 Jun 2010 09:57:02 +0000 Original-Received: (at 6362) by debbugs.gnu.org; 6 Jun 2010 09:56:54 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLCb8-0002zb-A4 for submit@debbugs.gnu.org; Sun, 06 Jun 2010 05:56:54 -0400 Original-Received: from smtp-out1.starman.ee ([85.253.0.3] helo=mx1.starman.ee) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLCb5-0002zU-J6 for 6362@debbugs.gnu.org; Sun, 06 Jun 2010 05:56:52 -0400 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (62.65.210.141.cable.starman.ee [62.65.210.141]) by mx1.starman.ee (Postfix) with ESMTP id C01A33F41E7; Sun, 6 Jun 2010 12:56:45 +0300 (EEST) In-Reply-To: (Li Zhai's message of "Sun, 6 Jun 2010 11:36:00 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 06 Jun 2010 05:57:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37566 Archived-At: > 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/