all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Madhu <enometh@meer.net>
Cc: 74208@debbugs.gnu.org
Subject: bug#74208: 31.0.50; minibuffer read-file-name-default mutates global value of default-directory incorrectly
Date: Sun, 08 Dec 2024 12:33:13 +0100	[thread overview]
Message-ID: <87seqyv286.fsf@gmx.de> (raw)
In-Reply-To: <20241208.161924.1904937058365373006.enometh@meer.net> (Madhu's message of "Sun, 08 Dec 2024 16:19:24 +0530 (IST)")

[-- Attachment #1: Type: text/plain, Size: 601 bytes --]

Madhu <enometh@meer.net> writes:

Hi Madhu,

> Thanks, something like the attached? the implementation of "turn on
> url-handler-mode temporarily" looks a bit gross but i guess it can't
> be avoided.  should call to turn it on be outside the
> minibuffer-setup-hook?

Perhaps, I haven't tested. However, the leading comment doesn't match
anymore the implementation (default-directory is let-bound now); better
you'll adjust it.

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 405 bytes --]

diff --git a/lisp/ffap.el b/lisp/ffap.el
index 6a4915fb5a3..b03e625c123 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 nil)
       (otherwise
        (apply operation args)))))


[-- Attachment #3: Type: text/plain, Size: 75 bytes --]


Does this solve your problem?

> --Regards, Madhu

Best regards, Michael.

  reply	other threads:[~2024-12-08 11:33 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-05  2:09 bug#74208: 31.0.50; minibuffer read-file-name-default mutates global value of default-directory incorrectly Madhu
2024-11-09 11:11 ` Eli Zaretskii
2024-11-09 16:11 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-10  0:57   ` Madhu
2024-11-10  6:00     ` Eli Zaretskii
2024-11-10  7:00       ` Madhu
2024-11-10 10:00         ` Eli Zaretskii
2024-11-10 10:41           ` Madhu
2024-11-10 10:45             ` Eli Zaretskii
2024-11-10 11:17               ` Madhu
2024-11-10 11:26                 ` Eli Zaretskii
2024-11-10 16:54         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-11  2:17           ` Madhu
2024-11-11  3:40             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-23 12:25               ` Eli Zaretskii
2024-11-23 14:56                 ` Madhu
2024-11-24  3:00                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-24  7:19                   ` Eli Zaretskii
2024-12-07 12:20                     ` Eli Zaretskii
2024-12-07 17:23                       ` Madhu
2024-12-07 18:27                         ` Eli Zaretskii
2024-12-08  8:46                         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-08 10:49                           ` Madhu
2024-12-08 11:33                             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-12-08 11:59                               ` Madhu
2024-12-08 15:13                                 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-08 16:26                                   ` Madhu
2024-12-08 17:28                                     ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-08 23:42                                       ` Madhu
2024-12-09  8:17                                         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87seqyv286.fsf@gmx.de \
    --to=bug-gnu-emacs@gnu.org \
    --cc=74208@debbugs.gnu.org \
    --cc=enometh@meer.net \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.