From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Li Zhai Newsgroups: gmane.emacs.bugs Subject: bug#6362: Emacs command `dired-isearch-filenames-regexp' cause CPU usage 100% Date: Sun, 6 Jun 2010 20:30:42 +0800 Message-ID: References: <87d3w4lc3r.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1275829093 27360 80.91.229.12 (6 Jun 2010 12:58:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 6 Jun 2010 12:58:13 +0000 (UTC) Cc: 6362@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 06 14:58:11 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 1OLFQY-0000ty-RF for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Jun 2010 14:58:11 +0200 Original-Received: from localhost ([127.0.0.1]:52918 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLFQY-0005ZJ-GV for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Jun 2010 08:58:10 -0400 Original-Received: from [140.186.70.92] (port=41979 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLFQP-0005Z3-Mc for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2010 08:58:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLFQO-0004by-9h for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2010 08:58:01 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36209) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLFQO-0004bt-5V for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2010 08:58:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OLF0I-0004hq-2l; Sun, 06 Jun 2010 08:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Li Zhai 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 12:31: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.127582745018083 (code B ref 6362); Sun, 06 Jun 2010 12:31:02 +0000 Original-Received: (at 6362) by debbugs.gnu.org; 6 Jun 2010 12:30:50 +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 1OLF05-0004hc-Sr for submit@debbugs.gnu.org; Sun, 06 Jun 2010 08:30:50 -0400 Original-Received: from mail-px0-f172.google.com ([209.85.212.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLF03-0004hW-W1 for 6362@debbugs.gnu.org; Sun, 06 Jun 2010 08:30:48 -0400 Original-Received: by pxi19 with SMTP id 19so844280pxi.3 for <6362@debbugs.gnu.org>; Sun, 06 Jun 2010 05:30:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=8HhChtOAStkuWndLBfJT8NfaVcnU93QuB74x0R1pqgQ=; b=XkfjAMmbGUZbf1nzq2v3lytxj3hm8E0MHBIidFTAuJdImyqwoMQrOPZCTfV7sC7Q2q 4Ka9X9a70Dy33K9fZFjdXIlHU+rdW1yz+rIuZ0si90t3q8ijrIIHRK+DDNB3/RUFQCX+ ZoZcttXStCc+r27oIbWauVRzuwDnUD86CQT5A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=oEUJGVhmZAuCt7TSs2h2B4Ugtwaiwru85g2CJfMygzqnUf4wc+pWoKwSK2eFjmC1tA OMxo+BBJnRiILER4MVe7kyfDh0CvcA90NxJWWh4AFU4RgjUmYEKQKf67KnlUtnDWsxCb kL+4BtIdfeG768LXiKs04WAb6mCZR8WvKccog= Original-Received: by 10.142.56.14 with SMTP id e14mr5586403wfa.37.1275827442177; Sun, 06 Jun 2010 05:30:42 -0700 (PDT) Original-Received: by 10.142.242.4 with HTTP; Sun, 6 Jun 2010 05:30:42 -0700 (PDT) In-Reply-To: <87d3w4lc3r.fsf@mail.jurta.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 06 Jun 2010 08:31: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:37567 Archived-At: 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 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 =A0^ f RET' >> >> Emacs will suspend rather than match the file names start with `f'. > > Thanks for the report. =A0I 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. =A0`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/ >