all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Tramp and VC integration: "calling user"
@ 2005-03-31 13:07 Kai Großjohann
  2005-03-31 13:34 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Kai Großjohann @ 2005-03-31 13:07 UTC (permalink / raw)


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
user-login-name.

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
question.

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?

Kai

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-04-03 17:19 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-31 13:07 Tramp and VC integration: "calling user" Kai Großjohann
2005-03-31 13:34 ` Stefan Monnier
2005-03-31 14:40   ` Kai Großjohann
2005-03-31 15:50     ` Stefan Monnier
2005-03-31 17:13       ` Kai Großjohann
2005-03-31 16:54   ` Andre Spiegel
2005-04-01  4:10 ` Richard Stallman
2005-04-01 17:43   ` Andre Spiegel
2005-04-01 19:14     ` Stefan Monnier
2005-04-02 20:52       ` Andre Spiegel
2005-04-03 17:19         ` Michael Albinus
2005-04-03  5:19     ` Richard Stallman
2005-04-03 10:15 ` Kai Großjohann

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.