tramp-devel
[Top][All Lists]
Advanced

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

Re: Tramp advises vc-user-login-name, how to remove?


From: Kai Großjohann
Subject: Re: Tramp advises vc-user-login-name, how to remove?
Date: Mon, 28 Mar 2005 18:54:23 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (usg-unix-v)

Andre Spiegel <address@hidden> writes:

> On Sun, 2005-03-27 at 15:10 +0200, Kai Großjohann wrote:
>
>> Could vc-rcs-fetch-master-state use user-login-name?  What is the
>> intent of that comparison?
>
> If the file is locked by the calling user, that means he can edit
> it.  If it's locked by somebody else, he shouldn't.  That's why the
> comparison is done.

This means we will have to introduce the concept of different "calling
users", depending on the file being edited.

One idea would be a new file operation file-is-mine or somesuch.  For
normal files, it would return true if the file owner is
user-login-name.  For remote files, it could compare with different
users.

Most of the time, one would expect (file-is-mine "/etc/passwd") to
return false, but (file-is-mine "/ssh:address@hidden:/etc/passwd")
would return true.

Hm.

The above is very specific.  Not sure if it is better to use a
lower-level, more generic function, say file-calling-user.  For normal
files it would return the name of the user that invoked Emacs.  For
remote files it would return the name of the remote user.

What do people think?

Kai





reply via email to

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