* Ido mode on Windows: please turn off cache
@ 2007-01-31 3:36 Herbert Euler
2007-01-31 4:18 ` Eli Zaretskii
0 siblings, 1 reply; 15+ messages in thread
From: Herbert Euler @ 2007-01-31 3:36 UTC (permalink / raw)
To: emacs-devel
Ido-mode uses a cache for saving the content of recently visted
directories, through the variable `ido-dir-file-cache'. While this is
not reliable on Windows. I found that creating a file in a directory
does not change the modification time of the directory on Windows, so
that if a directory is visited recently, ido-mode cannot show the new
files created after that visit.
What about turn off cache for Windows?
Regards,
Guanpeng Xu
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ido mode on Windows: please turn off cache
2007-01-31 3:36 Ido mode on Windows: please turn off cache Herbert Euler
@ 2007-01-31 4:18 ` Eli Zaretskii
2007-01-31 4:26 ` Herbert Euler
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Eli Zaretskii @ 2007-01-31 4:18 UTC (permalink / raw)
To: Herbert Euler; +Cc: emacs-devel
> From: "Herbert Euler" <herberteuler@hotmail.com>
> Bcc:
> Date: Wed, 31 Jan 2007 11:36:17 +0800
>
> Ido-mode uses a cache for saving the content of recently visted
> directories, through the variable `ido-dir-file-cache'. While this is
> not reliable on Windows. I found that creating a file in a directory
> does not change the modification time of the directory on Windows, so
> that if a directory is visited recently, ido-mode cannot show the new
> files created after that visit.
What version of Windows is that? Modern versions (Windows 2000 and
later) do change the directory modification time when a file is
created in the directory. Are you talking about Windows 9X/ME?
> What about turn off cache for Windows?
I don't think it's a good idea.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ido mode on Windows: please turn off cache
2007-01-31 4:18 ` Eli Zaretskii
@ 2007-01-31 4:26 ` Herbert Euler
2007-01-31 6:02 ` Herbert Euler
2007-01-31 4:28 ` Herbert Euler
2007-01-31 7:03 ` Herbert Euler
2 siblings, 1 reply; 15+ messages in thread
From: Herbert Euler @ 2007-01-31 4:26 UTC (permalink / raw)
To: eliz; +Cc: emacs-devel
>What version of Windows is that? Modern versions (Windows 2000 and
>later) do change the directory modification time when a file is
>created in the directory. Are you talking about Windows 9X/ME?
Hmmm, my Windows version is Microsoft Windows XP Professional
version 2002 Service Pack 2. And the command ``cmd'' shows
Microsoft Windows [version 5.1.2600].
Regards,
Guanpeng Xu
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ido mode on Windows: please turn off cache
2007-01-31 4:26 ` Herbert Euler
@ 2007-01-31 6:02 ` Herbert Euler
0 siblings, 0 replies; 15+ messages in thread
From: Herbert Euler @ 2007-01-31 6:02 UTC (permalink / raw)
To: herberteuler, eliz; +Cc: emacs-devel
>>What version of Windows is that? Modern versions (Windows 2000 and
>>later) do change the directory modification time when a file is
>>created in the directory. Are you talking about Windows 9X/ME?
>
>Hmmm, my Windows version is Microsoft Windows XP Professional
>version 2002 Service Pack 2. And the command ``cmd'' shows
>Microsoft Windows [version 5.1.2600].
Here is what I evaluated:
ELISP> (file-attributes "d:/home/xugp")
(t 1 5 5
(17831 45184)
(17799 38936)
(17799 38922)
0 "drwxrwxrwx" nil -32736
(17223 . 42209))
ELISP> (write-file "d:/home/xugp/ielm_text")
nil
ELISP> (file-attributes "d:/home/xugp")
(t 1 5 5
(17831 45184)
(17799 38936)
(17799 38922)
0 "drwxrwxrwx" nil -32736
(17223 . 42209))
ELISP>
Regards,
Guanpeng Xu
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ido mode on Windows: please turn off cache
2007-01-31 4:18 ` Eli Zaretskii
2007-01-31 4:26 ` Herbert Euler
@ 2007-01-31 4:28 ` Herbert Euler
2007-01-31 12:18 ` Kim F. Storm
2007-01-31 7:03 ` Herbert Euler
2 siblings, 1 reply; 15+ messages in thread
From: Herbert Euler @ 2007-01-31 4:28 UTC (permalink / raw)
To: eliz; +Cc: emacs-devel
> > What about turn off cache for Windows?
>
>I don't think it's a good idea.
Or at least could a way of ignoring cache be provided?
Regards,
Guanpeng Xu
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ido mode on Windows: please turn off cache
2007-01-31 4:28 ` Herbert Euler
@ 2007-01-31 12:18 ` Kim F. Storm
2007-01-31 13:14 ` Herbert Euler
2007-01-31 13:25 ` Herbert Euler
0 siblings, 2 replies; 15+ messages in thread
From: Kim F. Storm @ 2007-01-31 12:18 UTC (permalink / raw)
To: Herbert Euler; +Cc: eliz, emacs-devel
"Herbert Euler" <herberteuler@hotmail.com> writes:
>> > What about turn off cache for Windows?
>>
>>I don't think it's a good idea.
>
> Or at least could a way of ignoring cache be provided?
(setq ido-max-dir-file-cache 0)
But you can just use C-l at any time while reading a file name with
ido to refresh the cache of the current directory.
-
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ido mode on Windows: please turn off cache
2007-01-31 12:18 ` Kim F. Storm
@ 2007-01-31 13:14 ` Herbert Euler
2007-01-31 14:31 ` Jason Rumney
2007-01-31 13:25 ` Herbert Euler
1 sibling, 1 reply; 15+ messages in thread
From: Herbert Euler @ 2007-01-31 13:14 UTC (permalink / raw)
To: storm; +Cc: eliz, emacs-devel
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/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ido mode on Windows: please turn off cache
2007-01-31 13:14 ` Herbert Euler
@ 2007-01-31 14:31 ` Jason Rumney
2007-01-31 16:07 ` Herbert Euler
2007-01-31 18:50 ` Eli Zaretskii
0 siblings, 2 replies; 15+ messages in thread
From: Jason Rumney @ 2007-01-31 14:31 UTC (permalink / raw)
To: Herbert Euler; +Cc: eliz, emacs-devel, storm
Herbert Euler wrote:
> 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:
Strange. These two values are not set from the filesystem at all on w32,
but from the currently logged in user.
Although they will always be 0 on W95 derived systems, they should not
be affected by the filesystem on NT derived systems. A value of 0 is
possible there if the user is logged in as "Administrator".
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ido mode on Windows: please turn off cache
2007-01-31 14:31 ` Jason Rumney
@ 2007-01-31 16:07 ` Herbert Euler
2007-01-31 18:30 ` Eli Zaretskii
2007-01-31 18:50 ` Eli Zaretskii
1 sibling, 1 reply; 15+ messages in thread
From: Herbert Euler @ 2007-01-31 16:07 UTC (permalink / raw)
To: jasonr; +Cc: eliz, storm, emacs-devel
>Herbert Euler wrote:
>>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:
>Strange. These two values are not set from the filesystem at all on w32,
>but from the currently logged in user.
>Although they will always be 0 on W95 derived systems, they should not be
>affected by the filesystem on NT derived systems. A value of 0 is possible
>there if the user is logged in as "Administrator".
So it is not possible to know the file system type in Emacs?
Regards,
Guanpeng Xu
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ido mode on Windows: please turn off cache
2007-01-31 16:07 ` Herbert Euler
@ 2007-01-31 18:30 ` Eli Zaretskii
0 siblings, 0 replies; 15+ messages in thread
From: Eli Zaretskii @ 2007-01-31 18:30 UTC (permalink / raw)
To: Herbert Euler; +Cc: storm, emacs-devel, jasonr
> From: "Herbert Euler" <herberteuler@hotmail.com>
> Bcc:
> Date: Thu, 01 Feb 2007 00:07:28 +0800
> Cc: eliz@gnu.org, storm@cua.dk, emacs-devel@gnu.org
>
> So it is not possible to know the file system type in Emacs?
Not currently; not from Lisp, anyway (AFAICS). (Actually, you could
try add-name-to-file and if it succeeds, deduce that you are on NTFS,
but that's an ugly and expensive kludge.)
We could easily add a primitive to return the filesystem type, but I'd
prefer not to add any new features before the release.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ido mode on Windows: please turn off cache
2007-01-31 14:31 ` Jason Rumney
2007-01-31 16:07 ` Herbert Euler
@ 2007-01-31 18:50 ` Eli Zaretskii
1 sibling, 0 replies; 15+ messages in thread
From: Eli Zaretskii @ 2007-01-31 18:50 UTC (permalink / raw)
To: Jason Rumney; +Cc: herberteuler, emacs-devel, storm
> Date: Wed, 31 Jan 2007 14:31:14 +0000
> From: Jason Rumney <jasonr@gnu.org>
> Cc: storm@cua.dk, eliz@gnu.org, emacs-devel@gnu.org
>
> Herbert Euler wrote:
> > 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:
> Strange. These two values are not set from the filesystem at all on w32,
> but from the currently logged in user.
> Although they will always be 0 on W95 derived systems, they should not
> be affected by the filesystem on NT derived systems.
I can confirm what Jason says: I tried file-attributes on 2 drives,
one NTFS, the other FAT32, on the same system, and I get the same
uid/gid pairs on both of them. So this cannot be used as a way to
detect NTFS.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ido mode on Windows: please turn off cache
2007-01-31 12:18 ` Kim F. Storm
2007-01-31 13:14 ` Herbert Euler
@ 2007-01-31 13:25 ` Herbert Euler
2007-01-31 16:33 ` Kim F. Storm
1 sibling, 1 reply; 15+ messages in thread
From: Herbert Euler @ 2007-01-31 13:25 UTC (permalink / raw)
To: storm; +Cc: eliz, emacs-devel
>But you can just use C-l at any time while reading a file name with
>ido to refresh the cache of the current directory.
Yes, this is better than disabling cache, but it is still a bit netagive:
it requires a typing. Please read another message in this thread for
another way of dealing with it. Thanks.
Regards,
Guanpeng Xu
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ido mode on Windows: please turn off cache
2007-01-31 13:25 ` Herbert Euler
@ 2007-01-31 16:33 ` Kim F. Storm
0 siblings, 0 replies; 15+ messages in thread
From: Kim F. Storm @ 2007-01-31 16:33 UTC (permalink / raw)
To: Herbert Euler; +Cc: eliz, emacs-devel
"Herbert Euler" <herberteuler@hotmail.com> writes:
>>But you can just use C-l at any time while reading a file name with
>>ido to refresh the cache of the current directory.
>
> Yes, this is better than disabling cache, but it is still a bit netagive:
> it requires a typing. Please read another message in this thread for
> another way of dealing with it. Thanks.
Well, there are already two ways to deal with broken LoseDows behavior.
I'm not going to add more ....
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ido mode on Windows: please turn off cache
2007-01-31 4:18 ` Eli Zaretskii
2007-01-31 4:26 ` Herbert Euler
2007-01-31 4:28 ` Herbert Euler
@ 2007-01-31 7:03 ` Herbert Euler
2007-01-31 18:31 ` Eli Zaretskii
2 siblings, 1 reply; 15+ messages in thread
From: Herbert Euler @ 2007-01-31 7:03 UTC (permalink / raw)
To: eliz; +Cc: emacs-devel
>Modern versions (Windows 2000 and later) do change the directory
>modification time when a file is created in the directory.
This is not true in any cases. If the file system is NTFS, Windows
will update the modification time of the directory, but it will not do
it on the FAT32 file system. I did not test the case for FAT.
Regards,
Guanpeng Xu
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Ido mode on Windows: please turn off cache
2007-01-31 7:03 ` Herbert Euler
@ 2007-01-31 18:31 ` Eli Zaretskii
0 siblings, 0 replies; 15+ messages in thread
From: Eli Zaretskii @ 2007-01-31 18:31 UTC (permalink / raw)
To: Herbert Euler; +Cc: emacs-devel
> From: "Herbert Euler" <herberteuler@hotmail.com>
> Bcc:
> Date: Wed, 31 Jan 2007 15:03:03 +0800
> Cc: emacs-devel@gnu.org
>
> >Modern versions (Windows 2000 and later) do change the directory
> >modification time when a file is created in the directory.
>
> This is not true in any cases. If the file system is NTFS, Windows
> will update the modification time of the directory, but it will not do
> it on the FAT32 file system.
Right, I forgot that you need NTFS to have that feature.
> I did not test the case for FAT.
FAT behaves like FAT32 in this regard.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2007-01-31 18:50 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-31 3:36 Ido mode on Windows: please turn off cache Herbert Euler
2007-01-31 4:18 ` Eli Zaretskii
2007-01-31 4:26 ` Herbert Euler
2007-01-31 6:02 ` Herbert Euler
2007-01-31 4:28 ` Herbert Euler
2007-01-31 12:18 ` Kim F. Storm
2007-01-31 13:14 ` Herbert Euler
2007-01-31 14:31 ` Jason Rumney
2007-01-31 16:07 ` Herbert Euler
2007-01-31 18:30 ` Eli Zaretskii
2007-01-31 18:50 ` Eli Zaretskii
2007-01-31 13:25 ` Herbert Euler
2007-01-31 16:33 ` Kim F. Storm
2007-01-31 7:03 ` Herbert Euler
2007-01-31 18:31 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.