From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: enometh@meer.net, 74208@debbugs.gnu.org
Subject: bug#74208: 31.0.50; minibuffer read-file-name-default mutates global value of default-directory incorrectly
Date: Sun, 24 Nov 2024 09:19:47 +0200 [thread overview]
Message-ID: <86v7wdjdyk.fsf@gnu.org> (raw)
In-Reply-To: <jwvzflppce9.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Sat, 23 Nov 2024 22:00:16 -0500)
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: enometh@meer.net, 74208@debbugs.gnu.org
> Date: Sat, 23 Nov 2024 22:00:16 -0500
>
> > Ping! How should we make progress with this issue?
>
> I think the core of this bug report is that `shell-command` can fail
> when `default-directory` is set to a value that doesn't correspond to
> a local directory.
>
> At least for things like `(shell-command "date")` this is undesirable.
>
> Maybe `call-process` should try to "look for" a valid directory if
> `default-directory` isn't good enough?
It already does:
Lisp_Object
get_current_directory (bool encode)
{
Lisp_Object curdir = BVAR (current_buffer, directory);
Lisp_Object dir = Funhandled_file_name_directory (curdir);
/* If the file name handler says that dir is unreachable, use
a sensible default. */
if (NILP (dir))
dir = build_string ("~");
I guess this case somehow evades the test?
prev parent reply other threads:[~2024-11-24 7:19 UTC|newest]
Thread overview: 18+ 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 [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86v7wdjdyk.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=74208@debbugs.gnu.org \
--cc=enometh@meer.net \
--cc=monnier@iro.umontreal.ca \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).