From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Madhu Newsgroups: gmane.emacs.bugs Subject: bug#74208: 31.0.50; minibuffer read-file-name-default mutates global value of default-directory incorrectly Date: Sat, 07 Dec 2024 22:53:57 +0530 (IST) Message-ID: <20241207.225357.658499983555480229.enometh@meer.net> References: <86v7wdjdyk.fsf@gnu.org> <8634izk7ky.fsf@gnu.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3510"; mail-complaints-to="usenet@ciao.gmane.io" To: 74208@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 07 18:25:21 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tJyYS-0000mu-85 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Dec 2024 18:25:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJyYE-0004SX-40; Sat, 07 Dec 2024 12:25:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tJyYB-0004SM-0y for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2024 12:25:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tJyYA-0004mG-O7 for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2024 12:25:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Mime-Version:References:In-Reply-To:From:Date:To:Subject; bh=utPxiwjj5FugXxgjOHHU2aQV3HU1RHyDVQf/RJTQoEs=; b=PDb9wPjQiQ+rRDW//W3r6L8OxJiwPqr/KyKU6iZsia1YiGV9LrcXcMJjks6LDL/1PiszQunPSm6colkpJ3tar9aAiNXbKLZFcp2qAx3xP3MLAid8UvIkL33Ytp+StMqkK0lG/4V27u1eBcWw9yf6Ods4C2n4KMJ4BS2bJ3ghiH623vbGumZZUI5fPQUhhMTjS06bwzP6Qd8BOgYcMaFnu0ekV0HTGWS/mFxXXYeIhZTfx54ol6tHV7wkicnxn/nIg6hySrjZpuk8vheHatecFAZJilzEtYbp6CKEmX7EkJFGVCIZnlH5f/OoUO303I87p+53+61HGg52TVbBPcs4xg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tJyYA-0000UV-IY for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2024 12:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Madhu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Dec 2024 17:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74208 X-GNU-PR-Package: emacs Original-Received: via spool by 74208-submit@debbugs.gnu.org id=B74208.17335922551814 (code B ref 74208); Sat, 07 Dec 2024 17:25:02 +0000 Original-Received: (at 74208) by debbugs.gnu.org; 7 Dec 2024 17:24:15 +0000 Original-Received: from localhost ([127.0.0.1]:48379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJyXP-0000TC-4a for submit@debbugs.gnu.org; Sat, 07 Dec 2024 12:24:15 -0500 Original-Received: from smtp5.ctinetworks.com ([205.166.61.198]:51040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJyXN-0000T2-Gi for 74208@debbugs.gnu.org; Sat, 07 Dec 2024 12:24:14 -0500 X-ctinetworks-Watermark: 1734456252.96574@FwmBLrOS0Eu2McofbWje4A X-ctinetworks-Envelope-From: enometh@meer.net X-ctinetworks-VirusCheck: Found to be clean X-ctinetworks-Message-ID: C54822064ED3.A0875 Original-Received: from localhost (unknown [117.254.36.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: enometh@meer.net) by smtp5.ctinetworks.com (Postfix) with ESMTPSA id C54822064ED3 for <74208@debbugs.gnu.org>; Sat, 7 Dec 2024 12:24:10 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp5.ctinetworks.com C54822064ED3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meer.net; s=ctidkims1; t=1733592251; bh=utPxiwjj5FugXxgjOHHU2aQV3HU1RHyDVQf/RJTQoEs=; h=Date:To:Subject:From:In-Reply-To:References:From; b=D+B0o21hcjt2vriU09oU4Ay8OSbZXGUJQJ/9FkpZqGEjIPzwJdOuOcxGoFFpvmy1w tEFOL9S7VkuP8J43yTPOJ7kvUKQhKsNRwSUgUacYp5VlseQafHhnoAg/JMIEYgbt2+ m0naOJw0mYHM2UHla24lipGf+IuOmm2zQLeLa0Fs= In-Reply-To: <8634izk7ky.fsf@gnu.org> X-Mailer: Mew version 6.9 on Emacs 31.0.50 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296586 Archived-At: * Eli Zaretskii <8634izk7ky.fsf@gnu.org> Wrote on Sat, 07 Dec 2024 14:20:45 +0200 > Ping! Do we want to do anything about this issue? is "Keep it open" an option? :) call-process calls get_current_directory (which you exhibited) which in turn calls unhandled-file-name-directory, for which the documentation is ``` "unhandled-file-name-directory" Return a directly usable directory name somehow associated with \ FILENAME. A `directly usable' directory name is one that may be used without the intervention of any file name handler. If FILENAME is a directly usable file itself, return \(file-name-as-directory FILENAME). If FILENAME refers to a file which is not accessible from a local process, then this should return nil. The `call-process' and `start-process' functions use this function to get a current directory to run processes in. ``` (let ((default-directory "https://www.gnu.org/")) (unhandled-file-name-directory default-directory)) => "https://www.gnu.org/" call-process is bound to fail. I still haven't gotten around to trying url completions (I use the implementation in emacs-w3m w3m-urls-completion) but assuming it is going to useful, perhaps the completion mechanism should work off a new url-default-directory rather than default-directory if needed.