tramp-devel
[Top][All Lists]
Advanced

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

Re: Finding buffers visiting TRAMP sudo files


From: Basil L. Contovounesios
Subject: Re: Finding buffers visiting TRAMP sudo files
Date: Fri, 27 Oct 2017 15:18:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

On Fri, Oct 27 2017, at 14:09, Michael Albinus <address@hidden> 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



reply via email to

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