From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: kai@emptydomain.de (Kai =?iso-8859-15?Q?Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: Tramp and VC integration: "calling user" Date: Thu, 31 Mar 2005 15:07:58 +0200 Message-ID: <87is386k0h.fsf@emptydomain.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1112275034 18406 80.91.229.2 (31 Mar 2005 13:17:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 31 Mar 2005 13:17:14 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 31 15:17:11 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DGzXW-0003MF-TW for ged-emacs-devel@m.gmane.org; Thu, 31 Mar 2005 15:16:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DGzoD-0006bG-Ar for ged-emacs-devel@m.gmane.org; Thu, 31 Mar 2005 08:34:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DGzhX-0003sz-S2 for emacs-devel@gnu.org; Thu, 31 Mar 2005 08:27:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DGzhU-0003rV-FQ for emacs-devel@gnu.org; Thu, 31 Mar 2005 08:27:10 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DGzhU-0003q8-1W for emacs-devel@gnu.org; Thu, 31 Mar 2005 08:27:08 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1DGzQt-0007eA-CY for emacs-devel@gnu.org; Thu, 31 Mar 2005 08:10:00 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DGzOU-00021t-4f for emacs-devel@gnu.org; Thu, 31 Mar 2005 15:07:30 +0200 Original-Received: from pd9e1ecfb.dip.t-dialin.net ([217.225.236.251]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 31 Mar 2005 15:07:30 +0200 Original-Received: from kai by pd9e1ecfb.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 31 Mar 2005 15:07:30 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 29 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: pd9e1ecfb.dip.t-dialin.net User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (usg-unix-v) Cancel-Lock: sha1:ZhTzbbuRGgnaMR2NSmYyszih3O4= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:35422 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35422 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