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: Ido mode on Windows: please turn off cache Date: Wed, 31 Jan 2007 21:14:31 +0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1170249329 639 80.91.229.12 (31 Jan 2007 13:15:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 31 Jan 2007 13:15:29 +0000 (UTC) Cc: eliz@gnu.org, emacs-devel@gnu.org To: storm@cua.dk Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 31 14:15:12 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 1HCFIZ-0003sX-S6 for ged-emacs-devel@m.gmane.org; Wed, 31 Jan 2007 14:14:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCFIZ-0001IM-9z for ged-emacs-devel@m.gmane.org; Wed, 31 Jan 2007 08:14:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HCFIO-0001IC-Ig for emacs-devel@gnu.org; Wed, 31 Jan 2007 08:14:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HCFIM-0001Hn-Jl for emacs-devel@gnu.org; Wed, 31 Jan 2007 08:14:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HCFIM-0001Hk-FY for emacs-devel@gnu.org; Wed, 31 Jan 2007 08:14:38 -0500 Original-Received: from bay0-omc2-s37.bay0.hotmail.com ([65.54.246.173]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HCFIK-0002ST-Mj; Wed, 31 Jan 2007 08:14:36 -0500 Original-Received: from hotmail.com ([64.4.26.29]) by bay0-omc2-s37.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Wed, 31 Jan 2007 05:14:35 -0800 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 31 Jan 2007 05:14:35 -0800 Original-Received: from 64.4.26.200 by by112fd.bay112.hotmail.msn.com with HTTP; Wed, 31 Jan 2007 13:14:31 GMT X-Originating-IP: [221.216.147.46] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com In-Reply-To: X-OriginalArrivalTime: 31 Jan 2007 13:14:35.0496 (UTC) FILETIME=[C0E3DE80:01C74539] 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:65691 Archived-At: I got another idea of dealing with this. Please think about whether it is appropriate. I have tested it again to be sure, that if the file system is NTFS the modification time will be updated, while if the file system is FAT32 it will not. Again, I did not check the FAT file system. If this is the key to the problem, we can check some other infomation in addition to the modification time, to determine whether a directory is updated. The `file-attributes' function returns a list, the third and fourth element of which are file uid and file gid. These two fields are different on NTFS and FAT32. Please take a comparison: (file-attributes "c:/") ;; On FAT32 file system ==> (t 1 0 0 (0 0) (0 0) (0 0) 0 "drwxrwxrwx" nil 0 (7756 . 6145)) (file-attributes "c:/") ;; On NTFS file system ==> (t 1 5 5 (0 0) (0 0) (0 0) 0 "drwxrwxrwx" nil 0 (9440 . 10983)) Note that the uid and gid are different for the two file systems. I have tested many logical drives, all FAT32 drives come with (0 0), and all NTFS drives come with (5 5). What about this idea? If the OS is w32, and if the uid and gid are (0 0), it means reading from FAT32 file system, so the cache should be disabled; if they are (5 5), it means reading from NTFS file system, then the cache should be enabled? Regards, Guanpeng Xu _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/