From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Herbert Euler" Newsgroups: gmane.emacs.devel Subject: Re: propose: dired-isearch.el --- isearch in Dired Date: Wed, 08 Aug 2007 16:12:17 +0800 Message-ID: References: <87zm12h9vn.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1186560754 32427 80.91.229.12 (8 Aug 2007 08:12:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Aug 2007 08:12:34 +0000 (UTC) To: william.xwl@gmail.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 08 10:12:32 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IIgea-00075m-TW for ged-emacs-devel@m.gmane.org; Wed, 08 Aug 2007 10:12:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IIgea-0007Ct-13 for ged-emacs-devel@m.gmane.org; Wed, 08 Aug 2007 04:12:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IIgeW-0007Ag-79 for emacs-devel@gnu.org; Wed, 08 Aug 2007 04:12:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IIgeU-00078g-C0 for emacs-devel@gnu.org; Wed, 08 Aug 2007 04:12:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IIgeU-00078V-5I for emacs-devel@gnu.org; Wed, 08 Aug 2007 04:12:22 -0400 Original-Received: from bay0-omc2-s41.bay0.hotmail.com ([65.54.246.177]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IIgeT-0006PM-Qx for emacs-devel@gnu.org; Wed, 08 Aug 2007 04:12:22 -0400 Original-Received: from hotmail.com ([65.55.154.104]) by bay0-omc2-s41.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Wed, 8 Aug 2007 01:12:20 -0700 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 8 Aug 2007 01:12:20 -0700 Original-Received: from 65.55.154.123 by by143fd.bay143.hotmail.msn.com with HTTP; Wed, 08 Aug 2007 08:12:17 GMT X-Originating-IP: [216.145.54.158] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com In-Reply-To: <87zm12h9vn.fsf@gmail.com> X-OriginalArrivalTime: 08 Aug 2007 08:12:20.0296 (UTC) FILETIME=[D78AB480:01C7D993] X-Detected-Kernel: Windows 2000 SP4, XP SP1+ X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:76187 Archived-At: >Yes, this is a known bug.. > >,---- >| ;;; Bugs: >| >| ;; - search string starting with a "^" causes some infinite loop >`---- This bug is in the loop: (let ((point (re-search-forward regexp bound noerror count))) (catch 'return (while point (when (get-text-property (1- point) 'help-echo) (throw 'return point)) (setq point (re-search-forward regexp bound noerror count)))))) When the user types "^", REGEXP is "^". The value of POINT in `let' is the point of the start of the next line after point, which won't be changed in the future searches (i.e. the last form of the invocation to `re-search-forward'). So POINT is always the same value as the first invocation to `re-search-forward', and `throw' never gets called. As a result, this function won't return and the user won't get the chance to input the next character. I thought but got no simple solution. There is another bug: I searched "2.*" with `dired-isearch-forward-regexp', but search goes into other fields other than the file names. The properties of the start of the search results need to be checked as well. Regards, Guanpeng Xu _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/