Richard Stallman <[EMAIL PROTECTED]> writes:
> Does any of the following functions need to change?
> (assume that /tmp/DELETEME is a symlink that points to a non-existent
file)
>
> (read-file-name-internal "/tmp/DELETEME" "/tmp" 'lambda)
> currently returns nil. Should it return t?
>
> I think it depends on the purpose. In most cases, probably nil is
> right. For some specific purposes, for operating on symlinks, t would
> be better.
Here's what is going on here.
The call chain looks like this:
delete-file
read-file-name with the PREDICATE argument Qnil, because of that
this code is executed:
specbind (intern ("read-file-name-predicate"),
(NILP (predicate) ? Qfile_exists_p : predicate));
PC-do-completion
test-completions
read-file-name-internal <- this returns Qnil because of
this code:
if (!NILP (Vread_file_name_predicate))
return call1 (Vread_file_name_predicate, string);
read-file-name-predicate was bound to
file-exists-p, and (file-exists-p "/tmp/DELETEME")
return nil.
Given that some of the above functions are used in quite a few places,
I don't know what is the best solution for solving this.
Suggestions are welcome.
On the other hand this issue has been around forever, so it's not
something that is necessary to be solved before the release...
Thanks
--dan
_______________________________________________
Emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug