[armedbear-devel] undesirable behavior in #'directory ?
Marco Antoniotti
marcoxa at cs.nyu.edu
Tue Jan 7 10:05:59 UTC 2014
Hello,
as anything that deals with PATHNAMES is inherently a “hic sunt leones” area.
My suggestion - as a user! - regarding this TRUENAME issue is that the top confer is to minimize differences with other implementations. Another suggestion would be to see what Farè’s UIOP library is doing in this case.
Cheers
—
MA
On Jan 6, 2014, at 18:30 , Alan Ruttenberg <alanruttenberg at gmail.com> wrote:
> Emacs creates files like this:
> lrwxr-xr-x 1 alanr staff 30 Jan 6 01:40 .#foo.sql@ ->
> alanr at conjunctive-2.local.6427
>
> as lock files, IIRC.
>
> In such cases, the target of link names a file that doesn't exist.
> #'directory calls #'truename on the filenames that are listed, and
> truename does a probe file. Incidentally It looks like that is done in
> the java as well as the lisp function making the latter redundant.
>
> It seems wrong that there is a situation in which one can't call
> directory at all without getting an error.
>
> The crux of the matter is how to interpret the documentation of
> truename in the presence of symbolic links. The doc for truename
> says: If filespec is a pathname it represents the name used to open
> the file. This may be, but is not required to be, the actual name of
> the file."
>
> "actual name of the file" suggests that there is a file, but also
> suggests that it is the name that is important. Also whereas directory
> allows implementation-dependent keywords, truename is not so defined.
>
> I'll take the position that truename should *not* depend on the file
> existing, but rather focus on what names are present in directory
> structures. So resolve-truenames nil should should return the names in
> the directory and for resolve-truenames t it should follow symbolic
> links as long as they can be followed without hitting a name that
> doesn't designate an existing file.
>
> -Alan
--
Marco Antoniotti
More information about the armedbear-devel
mailing list