GNU bug report logs - #79236
30.1; file-directory-p in read-file-name prevents TRAMP protocol, user, and host completions

Previous Next

Package: emacs;

Reported by: "Timothy J. Miller" <tmiller <at> mitre.org>

Date: Thu, 14 Aug 2025 13:38:02 UTC

Severity: normal

Tags: patch

Found in version 30.1

Fixed in version 31.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Full log


View this message in rfc822 format

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: "Timothy J. Miller" <tmiller <at> mitre.org>, 79236 <at> debbugs.gnu.org, Michael Albinus <michael.albinus <at> gmx.de>
Subject: bug#79236: 30.1; file-directory-p in read-file-name prevents TRAMP protocol, user, and host completions
Date: Fri, 15 Aug 2025 04:44:05 +0300
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.