help-emacs-windows
[Top][All Lists]
Advanced

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

RE: [h-e-w] RE: How to check if 2 windows-files are the same


From: Geert Ribbers
Subject: RE: [h-e-w] RE: How to check if 2 windows-files are the same
Date: Tue, 7 Oct 2003 16:47:02 +0200

Hi.

Slow reaction since I didn't find time for this over the last weeks.

But:
Only in case of drive-mappings of your own system this happens.
If I map my home-directory (c:\data\geert) to z:\
Then z:\ and c:\ are definitely different directories.
But emacs (file-attributes) returns: (t 2 5 5 (0 0) (0 0) (0 0) 0
"drwxrwxrwx" nil 0 (62622 . 44923))
In *both* cases!
However for c:\data\geert it returns: (t 2 5 5 (16258 51768) (16258
51768) (16187 28471) 0 "drwxrwxrwx" nil 0 (62622 . 44923)).

File-truename returns: c:/ and z:/ respectively, so that doesn't help.
I can't see if Windows returns bogus or that emacs is wrong.



And there is also question 2 left: 
Emacs says t in respons to (file-exists-p "").

Isn't that very strange??

Regards, Geert Ribbers


-----Original Message-----
From: Nat Goodspeed [mailto:address@hidden 
Sent: Wednesday, September 17, 2003 2:57 AM
To: address@hidden
Subject: Re: [h-e-w] RE: How to check if 2 windows-files are the same

At 01:35 PM 9/16/03 +0200, you wrote:

>2. Can anyone tell me how I can see in elisp that (e.g.)
>c:\data\users\geert\.emacs and z:\.emacs are the same file (and that
>c:\data\users\geert and z:\ are the same directory)?
>
>Emacs itself doesn't see this standard, coz it opens 2 separate
buffers.
>
>I tried by checking file-attributes, and it seemed to work, but then I
>discovered that e.g. for c:\ and z:\ all the file-attributes are the
>same.
>
>Windows XP, Gnu Emacs 21.3.1

  I'm surprised by that, given the following remarks in the
file-attributes
documentation:

11. The file's inode number. If possible, this is an integer. If the
inode
number is too large to be represented as an integer in Emacs Lisp, then
the
value has the form (high . low), where low holds the low 16 bits. 
12. The file system number of the file system that the file is in. This
element
and the file's inode number together give enough information to
distinguish any
two files on the system--no two files can have the same values for both
of
these numbers. 

Are you saying that NT emacs just returns bogus information for these
two
"attributes" elements?
  Have you tried file-truename?








reply via email to

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