Stefan Monnier <[EMAIL PROTECTED]> writes:
> RMS wrote:
> >
> > This code needs to specify some other predicate, instead of file-exists-p.
> > Perhaps
>
> > (lambda (filename) (or (file-exists-p filename) (file-symlink-p
filename)))
Where exactly would you want the predicate to be specified?
In the partial-completion-mode code? (Like in the attached patch?)
Or in read-file-name?
> The normal completion simply has no predicate at all. I think
> partial-completion-mode should do likewise.
The predicate is _not_ specified by the partial-completion-mode code!
It is set by this code in read-file-name:
specbind (intern ("read-file-name-predicate"),
(NILP (predicate) ? Qfile_exists_p : predicate));
If you look in one of my messages in this thread:
PC-do-completion calls test-completions that calls
read-file-name-internal which 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 in read-file-name,
and (file-exists-p "/tmp/DELETEME") return nil.
This patch fixes the original problem. Is this the correct fix? (I am
not sure it is)
*** complete.el 30 Mar 2005 07:48:38 -0800 1.43
--- complete.el 20 May 2005 16:11:47 -0700
***************
*** 364,369 ****
--- 364,372 ----
p offset
(poss nil)
helpposs
+ (read-file-name-predicate (lambda (arg)
+ (or (file-exists-p arg)
+ (file-symlink-p arg))))
(case-fold-search completion-ignore-case))
;; Check if buffer contents can already be considered complete
_______________________________________________
Emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug