bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#74208: 31.0.50; minibuffer read-file-name-default mutates global val


From: Michael Albinus
Subject: bug#74208: 31.0.50; minibuffer read-file-name-default mutates global value of default-directory incorrectly
Date: Sun, 08 Dec 2024 16:13:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Madhu <enometh@meer.net> writes:

Hi Madhu,

>> I've checked the problem in ffap.el. It looks like we could use a much
>> simpler solution: implement unhandled-file-name-directory in
>> ffap--url-file-handler. Something like
>
> In a quick test with the "M-! echo foo" (in a recursive minibuffer at
> the ffap prompt), call-shell-region still fails "Setting current
> directory" error,

Indeed. The following patch seems to work better, could you pls test?

diff --git a/lisp/ffap.el b/lisp/ffap.el
index 6a4915fb5a3..180fe408104 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -1512,6 +1512,7 @@ ffap--url-file-handler
       ;; We mainly just want to disable these bits:
       (substitute-in-file-name (car args))
       (expand-file-name (car args))
+      (unhandled-file-name-directory temporary-file-directory)
       (otherwise
        (apply operation args)))))

> -- Regards, Madhu

Best regards, Michael.

reply via email to

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