emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: propose: dired-isearch.el --- isearch in Dired


From: Herbert Euler
Subject: Re: propose: dired-isearch.el --- isearch in Dired
Date: Wed, 08 Aug 2007 16:12:17 +0800

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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]