Ian Flanigan <[EMAIL PROTECTED]> writes:
> If you wanted to be wicked-gross, you could look for perl and do:
>
> perl -e 'print "uid=$> euid=$< groups=$( egroups=$)\n";'
Please note that the problem is to find out the numeric user id for a
given user name.
The documentation of file-attributes says that it should return the
numeric user and group id of the owner and group of the file in
question. On systems which grok `ls -n', this is simple enough to
do. On systems which don't, it is difficult.
I had a look at Emacs 20.3 a while ago. And it was very interesting
to see that vc.el was the only place where these return values of
file-attributes were ever used. And what does vc.el do with these
values? It passes them to vc-user-login-name which converts the
number back to a name!
Of course, the problem with all of this is that rcp.el returns a
number which is valid on the remote system, whereas vc.el tries to
interpret is as a user id on the local system. Bound to fail.
Maybe it isn't such a bad thing after all that ange-ftp just returns
-1...
I have written to the Emacs maintainers about this, but I'm not sure
if anything will happen. Surely changing the semantics of the return
values of file-attributes is not going to happen, even if there is
only one spot in the Lisp code distributed with Emacs which uses this.
One possibility would be to have vc-user-login-name receive the file
name in question as an argument. In fact, it could be added to the
file name operations to be handled by file-name-handler-alist. Which
would be even more wicked-gross than executing Perl to find the
numeric uid and gid, since the conversion between name and number
isn't actually needed :-(
Argl.
kai
--
I like BOTH kinds of music.