unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* ls-lisp and remote files
@ 2003-10-30 20:06 Lars Hansen
  2003-10-30 20:25 ` Stefan Monnier
  0 siblings, 1 reply; 18+ messages in thread
From: Lars Hansen @ 2003-10-30 20:06 UTC (permalink / raw)
  Cc: tramp-devel

  I have been working on making ls-lisp work for remote files. To do 
that I have made a Tramp implementation of 
directory-files-and-attributes using perl on the remote machine. This 
works fine except for the translation of UID's and GID's to names. To 
make this translation, ls-lisp calls user-login-name which works in the 
context of the local machine, and that is wrong for remote directories. 
Of cource one could just let ls-lisp check if the directory is remote 
and make no translation if it is. However, I sugest the following:

1. Add an optional parameter ID-NAMES to the lisp functions 
file-attributes and directory-files-and-attributes. When ID-NAMES is 
non-nil, UID and GID is returned as names if possible.

2. Let ls-lisp use this feature to obtain UID and GID names.

I have implemented these change on my own machine (dired.c, lisp.h, 
ls-lisp.el, tramp.el) and it seems to work fine.

I want to ask people what you think about this suggestion.

----------------

One more related thing.
IFAICS it is a bug that the current implementation of ls-lisp calls 
user-login-name to obtain group name. user-login-name calls getpwuid, 
but getgrgid should be used for that, I think. It might work on 
GNU/Linux systems but it fails on Sun systems, at least the one I have 
access to. On the Sun system UID's and GID's are not disjoint.
With the changes I suggest above there is no need to make a lisp 
interface to getgrgid since the translation may be done in dired.c.

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

end of thread, other threads:[~2003-11-14 20:09 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-30 20:06 ls-lisp and remote files Lars Hansen
2003-10-30 20:25 ` Stefan Monnier
2003-11-05 21:39   ` Kai Grossjohann
2003-11-06 13:37     ` Stefan Monnier
2003-11-06 14:25       ` Lars Hansen
2003-11-08  2:16       ` Richard Stallman
2003-11-09 21:29       ` Lars Hansen
2003-11-10 21:57         ` Richard Stallman
2003-11-11  7:03           ` Lars Hansen
2003-11-12  2:29             ` Richard Stallman
2003-11-12 10:41               ` Lars Hansen
2003-11-13  2:39                 ` Richard Stallman
2003-11-13 17:21                   ` Kevin Rodgers
2003-11-13 18:05                     ` Andreas Schwab
2003-11-13 18:48                       ` David Kastrup
2003-11-14 20:09                         ` Richard Stallman
2003-11-14 10:36                   ` Lars Hansen
2003-11-12 22:12             ` Kai Grossjohann

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).