[Top][All Lists]

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

Tramp and VC integration: "calling user"

From: Kai Großjohann
Subject: Tramp and VC integration: "calling user"
Date: Thu, 31 Mar 2005 15:07:58 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (usg-unix-v)

Tramp advises some VC functions.  It is bad for one package in Emacs
to advise functions in another.

In one of those cases, VC wants to find out if a file is locked by the
calling user.  To do this, VC invokes a command to print the name of
the user who locked the file, and then compares that name with

For remote files, the comparison should not be with user-login-name,
it should instead be with the user logged into the remote host in

Suggestions for solving this:

(1) New file operation file-mine-p, returns true if the file is owned
    by the "calling user".  For non-special files, the calling user is
    the user who invoked Emacs.  For Tramp files, the calling user is
    the user logged into the remote host.

(2) New file operation file-calling-user, returns the calling user, as
    defined in (1).

(3) Augment the return value of file-remote-p to indicate the calling
    user.  The return value could be augmented to also indicate the
    remote host, if the file is remote.

What do people think?


reply via email to

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