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: Sun, 10 Nov 2024 16:47:17 +0530 (IST) Message-ID: <20241110.164717.37865040188913982.enometh@meer.net> References: <86h68fl86n.fsf@gnu.org> <20241110.161141.2279816734440691375.enometh@meer.net> <86ed3jl63j.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="38743"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, 74208@debbugs.gnu.org To: eliz@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 10 12:18:20 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 1tA5xT-0009x8-Kz for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Nov 2024 12:18:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tA5xF-0008W6-Ts; Sun, 10 Nov 2024 06:18:05 -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 1tA5xD-0008Va-2o for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2024 06:18: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 1tA5xC-0006Ui-Qg for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2024 06:18: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=JM47T+TeQ10rcuoBWBLM/RlDMLphK43dlLZqntnYtGA=; b=jqTYabu84BTJv51/eyIrZKMyCLyYKbESgK3woql+2GaJpeKOnN+nLA1YI6pU/jv6B9m7lSsGSg6+Jt+0WSdn87ppknUmkf0RRU7zK4m4s1iA6G82w4slztrfYGhCz0ouBiVFcL6BlnJC6o7Tr5w6d/Lsj2Hk3c6S+lrnJQBngyA15aPPlzheG0vQRXGth5LUKuKWWhP3csIRS2l5dM1UfDmK1VL90icPNznOFuMm7tMH/gmVtm/RSkailaQBoF6AsyOmW9KZ51w1PioMqS5EdhBXj/68CJ236ax8DXaGFZrwbVDKy7E3l5k0ALgsxRzKbAFW5SxUg2nT88rYdrfpZA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tA5xC-0004UJ-DW for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2024 06:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Madhu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Nov 2024 11:18: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.173123742417181 (code B ref 74208); Sun, 10 Nov 2024 11:18:02 +0000 Original-Received: (at 74208) by debbugs.gnu.org; 10 Nov 2024 11:17:04 +0000 Original-Received: from localhost ([127.0.0.1]:55912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tA5wG-0004T0-4g for submit@debbugs.gnu.org; Sun, 10 Nov 2024 06:17:04 -0500 Original-Received: from smtp0.ctinetworks.com ([205.166.61.207]:44642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tA5wD-0004SX-7D for 74208@debbugs.gnu.org; Sun, 10 Nov 2024 06:17:02 -0500 X-ctinetworks-Watermark: 1732101420.46826@L/QH0/6OdMg5ayOckosNrA X-ctinetworks-Envelope-From: enometh@meer.net X-ctinetworks-VirusCheck: Found to be clean X-ctinetworks-Message-ID: B5685601C.A0863 Original-Received: from localhost (unknown [117.254.37.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: enometh@meer.net) by smtp0.ctinetworks.com (Postfix) with ESMTPSA id B5685601C; Sun, 10 Nov 2024 06:16:55 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp0.ctinetworks.com B5685601C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meer.net; s=ctidkims1; t=1731237416; bh=JM47T+TeQ10rcuoBWBLM/RlDMLphK43dlLZqntnYtGA=; h=Date:To:Cc:Subject:From:In-Reply-To:References:From; b=ECrrvoyZ3LTxzYYfrXbCUj0ckcpiUvLTcHdLJ4o3twC1mhY2z9tZmz2Pd37L3pNFn egQmJU90WMlPN3Y1r8VMXFK6NUeMPFiWW9iVa8hhrXuyGJVVNBCec5gcgf0Gmqf5g4 7rhGMXBzAfovDVSipiz9HHycZDSju5UQCFjnCBjo= In-Reply-To: <86ed3jl63j.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:295179 Archived-At: * Eli Zaretskii <86ed3jl63j.fsf@gnu.org> Wrote on Sun, 10 Nov 2024 12:45:52 +0200 >> I was evaluating it under edebug after calling edebug-defun on >> read-file-name-default, and ivoking (ffap) on the url. >> >> It returns the argument with or without the second parameter to >> expand-file-name, and I was hoping I could count on this behaviour to >> separate the urls from the files. >> >> The behaviour of expand-file-name is apparenlty modified when it comes >> to read-file-name-default, but I can't spot what's going on. ????? > > Perhaps because TRAMP was loaded? It's because of the call to (ffap-read-file-or-url "foo" "https://example.com/") which roughly does the equivalent of (let ((file-name-handler-alist (cl-adjoin (cons ffap-url-regexp #'ffap--url-file-handler) file-name-handler-alist))) (expand-file-name "https://example.com" "~")) Maybe the idea will still work?