From 8368c14e1768f87ac40b6996dd1a5b9e3f9d5ffc Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 2 Nov 2009 02:06:36 +0000 Subject: [PATCH] * minibuffer.el (read-file-name): Don't use file dialogs for remote directories (Bug#99). --- lisp/ChangeLog | 5 +++++ lisp/minibuffer.el | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9c92b7b507a..88b6a6ab98d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-11-02 Chong Yidong + + * minibuffer.el (read-file-name): Don't use file dialogs for + remote directories (Bug#99). + 2009-11-01 Chong Yidong * progmodes/sh-script.el (sh-font-lock-paren): Fix last change. diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 783e219199b..59732fd4b8a 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -1292,9 +1292,10 @@ DIR should be an absolute directory name. It defaults to the value of If this command was invoked with the mouse, use a graphical file dialog if `use-dialog-box' is non-nil, and the window system or X -toolkit in use provides a file dialog box. For graphical file -dialogs, any the special values of MUSTMATCH; `confirm' and -`confirm-after-completion' are treated as equivalent to nil. +toolkit in use provides a file dialog box, and DIR is not a +remote file. For graphical file dialogs, any the special values +of MUSTMATCH; `confirm' and `confirm-after-completion' are +treated as equivalent to nil. See also `read-file-name-completion-ignore-case' and `read-file-name-function'." @@ -1325,7 +1326,10 @@ and `read-file-name-function'." (add-to-history nil)) (let* ((val - (if (not (next-read-file-uses-dialog-p)) + (if (or (not (next-read-file-uses-dialog-p)) + ;; Graphical file dialogs can't handle remote + ;; files (Bug#99). + (file-remote-p dir)) ;; We used to pass `dir' to `read-file-name-internal' by ;; abusing the `predicate' argument. It's better to ;; just use `default-directory', but in order to avoid -- 2.39.5