[Top][All Lists]

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

Re: partial-completion-mode and deleting symlink problem

From: Dan Nicolaescu
Subject: Re: partial-completion-mode and deleting symlink problem
Date: Tue, 17 May 2005 22:51:31 -0700

Richard Stallman <address@hidden> writes:

  >     Does any of the following functions need to change?
  >     (assume that /tmp/DELETEME is a symlink that points to a non-existent 
  >     (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:
   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));
             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...


reply via email to

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