From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
Cc: emacs-devel@gnu.org
Subject: Re: file-symlink-p for remote files?
Date: Tue, 08 Apr 2003 14:31:55 -0400 [thread overview]
Message-ID: <200304081831.h38IVtTG029258@rum.cs.yale.edu> (raw)
In-Reply-To: 847ka5qafi.fsf@lucy.is.informatik.uni-duisburg.de
> Let's say I have a remote system with a symlink, like so:
>
> $ ls -ld /foo
> lrwxrwxrwx 1 root root 9 Feb 28 14:51 /foo -> /bar
>
> Note that the symlink target is given as an absolute name.
>
> Which value should be returned by (file-symlink-p "/user@host:/foo")?
>
> (1) "/user@host:/bar"
> (2) "/bar"
> (3) something else, please specify: ___________________________
I like to think of symlinks as "special files" that can contain arbitrary
text (as used for example by Emacs in its file locking protocol),
but in practice this poses problems, so I think the right answer is
option (1). See for example ange-ftp.
The reason is that there are elisp routines (such as file-truename
I guess) that do the symlink-dereference manually rather than relying
on the OS to do it for use.
Stefan
next prev parent reply other threads:[~2003-04-08 18:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-08 15:24 file-symlink-p for remote files? Kai Großjohann
2003-04-08 18:31 ` Stefan Monnier [this message]
2003-04-08 18:49 ` Kai Großjohann
2003-04-08 19:03 ` Stefan Monnier
2003-04-08 19:10 ` Kai Großjohann
2003-04-08 19:14 ` Stefan Monnier
2003-04-09 5:39 ` Richard Stallman
2003-04-09 1:58 ` Richard Stallman
2003-04-09 12:56 ` Kai Großjohann
2003-04-09 19:29 ` Kai Großjohann
2003-04-10 6:22 ` Richard Stallman
2003-04-09 19:57 ` Kai Großjohann
2003-04-10 22:47 ` Richard Stallman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200304081831.h38IVtTG029258@rum.cs.yale.edu \
--to=monnier+gnu/emacs@rum.cs.yale.edu \
--cc=emacs-devel@gnu.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.