On Fri, Oct 27 2017, at 14:09, Michael Albinus <[email protected]> wrote:

Hi Michael,

>> Hmm, for me on GNU/Linux the device numbers are indeed
>> different but the inode number is always the same:
>>
>>   (equal (file-attribute-inode-number
>>           (file-attributes "/etc/pam.conf"))
>>          (file-attribute-inode-number
>>           (file-attributes "/sudo::/etc/pam.conf")))
>>       ⇒ t
>>
>>   (equal (file-attribute-device-number
>>           (file-attributes "/etc/pam.conf"))
>>          (file-attribute-device-number
>>           (file-attributes "/sudo::/etc/pam.conf")))
>>       ⇒ nil
>>
>> Is there anything unusual about this?
>
> That's as expected. However, on remote hosts which do not
> tell us inode numbers, Tramp generates virtual ones. Think
> about "smb", for example.

OK, makes sense.

> Tramp has no information about how different methods and
> hosts are related. Even "/ssh::.emacs" and "/scp::.emacs"
> live on different filesystems for Tramp.
>
> One could implement such a relation for local files and
> remote files on the local host, using Tramp's
> `tramp-local-host-p' function. This would require an
> extension to Tramp's implementation of `file-equal-p'.
>
> Hmm, I'm kind of undecided whether it's worth to do.

FWIW, and from what you have explained, this sounds like it
would involve a disproportionate amount of effort for such
specialised functionality (which would not even necessarily
help much in scratching my original itch).  I wonder if a
need for such functionality has ever been expressed before.

Thanks again for your time and helpful explanations.

Regards,

-- 
Basil

_______________________________________________
Tramp-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to