emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: convert-standard-filename


From: Eli Zaretskii
Subject: Re: convert-standard-filename
Date: Tue, 09 Aug 2011 01:19:50 -0400

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden, address@hidden
> Date: Mon, 08 Aug 2011 17:24:02 -0400
> 
> >> Ever heard of (symbolic|hard) links?
> > Not sure.  Something vague comes to mind...
> > So what are they? file-name-equal or file-equal, or maybe both?
> 
> I think they're file-equal but not file-name-equal, since I consider
> file-name-equal to be something that shouldn't pay too much attention to
> the actual existing files.

That is a slippery slope, IMO: many users of these APIs will neither
know nor care whether the files by those names exist or not.

It also raises some hard-to-resolve questions of applicability of each
API to non-Posix platforms.  E.g., the 8+3 alias is a kind of hard
link, but comes into existence the moment its original file does, and
OTOH can be computed even if the original file does not exist.

So I would suggest a single API, not 2.  If some Lisp program wants to
drill down to the hard/symbolic link level, there are already APIs to
do that.

> But that's part of the issues that need to be clarified in the design
> of file-name-equal.  BTW, rather than file-name-equal we may prefer to
> provide file-name-canonical such that
> 
>   (defun file-name-equal (f1 f2)
>     (equal (file-name-canonical f1) (file-name-canonical f2)))

Another slippery slope, IMO: on some platforms the "canonical" file
name cannot be computed unless the file exists.  Unless you redefine
"canonical" to be a derivative of file-name-equal according to the
above defun, in which case it will probably confuse the heck out of
programmers who are used to canonicalize_file_name and realpath.

> In any case, all these things are for post-24.1.

Well, 24.1 is already in the past, nes pas? ;-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]