Dan Nicolaescu <[EMAIL PROTECTED]> writes:

  > partial-completion-mode seems to cause a problem when one tries to
  > delete a symlink to a non-existent file. 
  > 
  > Try this:
  > 
  > ln -s BLAHBLAHBLAH /tmp/DELETEME 
  > (this assumes that neither BLAHBLAHBLAH nor /tmp/DELETEME exist before
  > running ln).
  > 
  > emacs -q
  > M-x partial-completion-mode RET
  > M-x delete-file RET /tmp/DELETEME RET
  > 
  > instead of deleting /tmp/DELETEME the minibuffer shows:
  > Delete file: /tmp/DELETEME [Confirm]
  > Pressing RET does not do anything... 
  > 
  > If the symlink target for /tmp/DELETEME exists, then /tmp/DELETEME is
  > deleted just fine...

A bit of debugging shows that the partial completion code calls: 

(test-completion "/tmp/DELETEME" 'read-file-name-internal "/tmp")
which returns nil because it calls 

(read-file-name-internal "/tmp/DELETEME" "/tmp" 'lambda)
which returns nil because it calls 

Ffile_exists_p ("/tmp/DELETEME")
which returns nil because it calls stat ("/tmp/DELETEME")

If "stat" was to be changed to "lstat" then the original problem would
be fixed.

But is that change desirable?  
What should (file-exists-p "/tmp/DELETEME") return when /tmp/DELETEME
is a symlink that points to a non-existent file? 



_______________________________________________
Emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to