From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel Subject: Re: Build failure on M$ (using MSVC): Patch enclosed Date: Tue, 20 May 2008 10:46:20 +0100 Message-ID: <48329DEC.4020904@gnu.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1211276834 3734 80.91.229.12 (20 May 2008 09:47:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 May 2008 09:47:14 +0000 (UTC) Cc: Emacs Devel To: dhruva Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 20 11:47:42 2008 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 1JyORO-0008W7-50 for ged-emacs-devel@m.gmane.org; Tue, 20 May 2008 11:47:30 +0200 Original-Received: from localhost ([127.0.0.1]:60732 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JyOQd-0006ir-UN for ged-emacs-devel@m.gmane.org; Tue, 20 May 2008 05:46:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JyOQV-0006gI-Mo for emacs-devel@gnu.org; Tue, 20 May 2008 05:46:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JyOQT-0006dd-BS for emacs-devel@gnu.org; Tue, 20 May 2008 05:46:34 -0400 Original-Received: from [199.232.76.173] (port=46117 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JyOQS-0006dD-8S for emacs-devel@gnu.org; Tue, 20 May 2008 05:46:32 -0400 Original-Received: from mk-outboundfilter-5-a-2.mail.uk.tiscali.com ([212.74.114.4]:51328) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JyOQQ-0002nW-Pw for emacs-devel@gnu.org; Tue, 20 May 2008 05:46:31 -0400 Original-X-Trace: 30163854/mk-outboundfilter-5.mail.uk.tiscali.com/F2S/$ACCEPTED/freedom2Surf-customers/83.67.23.108 X-SBRS: None X-RemoteIP: 83.67.23.108 X-IP-MAIL-FROM: jasonr@gnu.org X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuYEAFA6MkhTQxds/2dsb2JhbACBVaw0 X-IronPort-AV: E=Sophos;i="4.27,515,1204502400"; d="scan'208";a="30163854" X-IP-Direction: IN Original-Received: from i-83-67-23-108.freedom2surf.net (HELO wanchan.jasonrumney.net) ([83.67.23.108]) by smtp.f2s.tiscali.co.uk with ESMTP; 20 May 2008 10:46:29 +0100 Original-Received: from [192.168.249.27] (chiko.jasonrumney.net [192.168.249.27]) by wanchan.jasonrumney.net (Postfix) with ESMTP id DAB2415B9; Tue, 20 May 2008 10:46:27 +0100 (BST) User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) In-Reply-To: X-Enigmail-Version: 0.95.6 OpenPGP: id=8086879D X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:97442 Archived-At: dhruva wrote: > The below patch fixes the bug of infinite looping. > > diff --git a/lisp/files.el b/lisp/files.el > index ee5efe4..c680d32 100644 > --- a/lisp/files.el > +++ b/lisp/files.el > @@ -3120,8 +3120,9 @@ If the file is in a registered project, a cons from > `project-directory-alist' is returned. > Otherwise this returns nil." > (let ((dir (file-name-directory file)) > + (root (expand-file-name "/")) > (result nil)) > - (while (and (not (string= dir "/")) > + (while (and (not (string= dir root)) > (not result)) > (cond > ((setq result (assoc dir project-directory-alist)) > I don't think this is sufficient for the case when the current directory is say "C:/some_dir/" and file is "D:/file.txt" Should this new project code be enabled by default? It seems to add a lot of directory searching overhead for simple file visiting, especially in batch mode.