unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Hansen <larsh@math.ku.dk>
Cc: tramp-devel@nongnu.org
Subject: ls-lisp and remote files
Date: Thu, 30 Oct 2003 21:06:44 +0100	[thread overview]
Message-ID: <3FA16F54.80201@math.ku.dk> (raw)

  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.

             reply	other threads:[~2003-10-30 20:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-30 20:06 Lars Hansen [this message]
2003-10-30 20:25 ` ls-lisp and remote files 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3FA16F54.80201@math.ku.dk \
    --to=larsh@math.ku.dk \
    --cc=tramp-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).