GNU bug report logs -
#79236
30.1; file-directory-p in read-file-name prevents TRAMP protocol, user, and host completions
Previous Next
Full log
View this message in rfc822 format
Timothy, thanks for the report.
Michael, what do you think? Could this be fixed in Tramp's completion,
or is there maybe a better way to use read-directory-name from
project-prompt-project-dir?
On 14/08/2025 16:34, Timothy J. Miller wrote:
> From `emacs -Q`:
>
> (require 'tramp)
> (read-file-name "With file-directory-p: " default-directory nil t
> nil 'file-directory-p)
>
> - Type "/<TAB>" at the prompt. TRAMP protocols are missing from
> the completions list.
>
> - Type "/ssh:<TAB>" at the prompt. TRAMP username & hostname are
> missing from the completion list.
>
> By way of contrast:
>
> (read-file-name "Without file-directory-p: " default-directory nil
> t nil nil)
>
> Repeating the two test cases above, TRAMP suggestions are present.
>
> read-directory-name calls read-file-name with file-directory-p as
> the match predicate, and project.el project-prompt-project-dir
> loads new projects with read-directory-name. This bug prevents
> easy selection of projects on remote servers. Because find-file
> works correctly with the same emacs configuration, this breaks
> user expectations.
This bug report was last modified 8 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.