emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 34186fb365: Further ffap-read-file-or-url tweaks


From: Lars Ingebrigtsen
Subject: master 34186fb365: Further ffap-read-file-or-url tweaks
Date: Tue, 20 Sep 2022 06:39:34 -0400 (EDT)

branch: master
commit 34186fb365f4d1b4e7368aa051f469bc74498730
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Further ffap-read-file-or-url tweaks
    
    * lisp/ffap.el (ffap-read-file-or-url): Make this work for URLs
    again if you're using `ido-everywhere' (bug#57943).
---
 lisp/ffap.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/ffap.el b/lisp/ffap.el
index 7ea05dccbd..482ac3764a 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -1504,7 +1504,11 @@ which may actually result in an URL rather than a 
filename."
         (progn
           (push elem file-name-handler-alist)
           (if (ffap-url-p guess)
-              (read-file-name prompt guess guess)
+              ;; We're using the default file name prompter here -- it
+              ;; allows you to switch back to reading a file name,
+              ;; while other prompters, like ido, really expect a
+              ;; file, and don't allow you to edit it if it's an URL.
+              (funcall #'read-file-name-default prompt guess guess)
             (unless guess
               (setq guess default-directory))
             (unless (ffap-file-remote-p guess)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]