On 10 Oct 1999, Kai Großjohann <[EMAIL PROTECTED]>
wrote:

> Daniel Pittman <[EMAIL PROTECTED]> writes:
> 
>> While working on the VC remote username code, I believe I have a
>> solution. To know how general it is, however, I would like to know if
>> there are any platforms out there that don't have the grep(1) and
>> cut(1) tools installed.
> 
> I'm not sure that the name-to-number mapping is the right thing to do,
> but I have received no response from the Emacs team.  In Emacs 20.3,
> there was only one place where the (numeric) user id which is returned
> from file-attributes was ever used.  And that was in vc.el, and only
> to return the user _name_ associated with the _id_!

This is also true for XEmacs 21.1 and 21.2. 

> I think it would be a great benefit if we could just make
> file-attributes return the user _name_ and use it as-is.  But I'm sure
> it would be difficult to do in a backward-compatible way.

I can't think of a good way to do so, except maybe to return two extra
values in the file-attributes return, at the end, with the user and
group names as strings. That would push the backward compatibility
issues off to the people who wanted that information (VC authors :)

> Do you think I should try to talk to the Emacs maintainers again?

Well... not on my account. As I went to verify my belief that there was
only the one place that wanted the uid => name mapping done, I
discovered something else.

In my VC, the only place that actually calls (vc-user-login-name) with a
uid is:

(defun vc-file-owner (file)
  ;; Return who owns FILE (user name, as a string).

So, rather than spend a lot of effort putting in a hack that will not
work so well (I think) for the mapping, I will am writing an advice for
this function to make it behave sensibly and not try to map uid => name
for rcp files. Let 'ls' do all the hard work for us. :)

        Daniel

-- 
Art is the soul of a people.
        -- Romare Bearden

Reply via email to