From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii 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 13:26:10 +0200 Message-ID: <86cyj3l48d.fsf@gnu.org> References: <86h68fl86n.fsf@gnu.org> <20241110.161141.2279816734440691375.enometh@meer.net> <86ed3jl63j.fsf@gnu.org> <20241110.164717.37865040188913982.enometh@meer.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32585"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, 74208@debbugs.gnu.org To: Madhu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 10 12:27:52 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 1tA66h-0008L3-Rx for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Nov 2024 12:27:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tA66E-0001NU-SX; Sun, 10 Nov 2024 06:27:22 -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 1tA65u-0001LP-Ly for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2024 06:27:02 -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 1tA65u-0007NT-Cw for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2024 06:27:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=HvVNyGEj6D6g8+FcKeexnIMzclgvoQvwFdZTLuTRF/E=; b=GstFv/FttFTmDUgkmPIKMP+AE4axFM9u8DuOchF6C5DqVOnFnJYk7mRmVQT6yT0yLIPuodoAtDft+bSaXQuqZcUYRNff0e2eXvWeZ8uP7FI1x5m9E4CoE30JRh9LgRj5Tg541uT4CqvTpg//XtHy7UzNkxvriJLG1VSHGzV076+8PTHgZCzxeCvP6w8BU2UVMg6ts/s2JgkT/Oo7e0m6aPqHlozn6qxolhKxMQ5ZobaSJCxuASgjerdQlRqBH971RwKGCltY2+Dt/ebPTZRe8XOAZoDxx52TmIfK/+z9Xv+JkSvvxCRf+WRqxIUb453ZaAjv8xKSwwJF5/VWcTVSqw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tA65u-0004v1-9A for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2024 06:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Nov 2024 11:27: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.173123798318841 (code B ref 74208); Sun, 10 Nov 2024 11:27:02 +0000 Original-Received: (at 74208) by debbugs.gnu.org; 10 Nov 2024 11:26:23 +0000 Original-Received: from localhost ([127.0.0.1]:55932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tA65H-0004to-65 for submit@debbugs.gnu.org; Sun, 10 Nov 2024 06:26:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59076) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tA65E-0004tS-T9 for 74208@debbugs.gnu.org; Sun, 10 Nov 2024 06:26:21 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tA658-0007MU-Ge; Sun, 10 Nov 2024 06:26:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=HvVNyGEj6D6g8+FcKeexnIMzclgvoQvwFdZTLuTRF/E=; b=Ar2ceEyr6mwk 6DLgN82GJNoowCa72f0c4SGdBVyar4VBWwdQ4oxGpEGMjlQNIpC2P+AH+JQ2Jr4HOi304c6KdCU8n HPC6ZcsjLhDbZ927ZHyxQFMnCF4AJp1ZTXr9k8DiV3mMgoLizEs9wGkIazsp1WikHsz2auI72RBhk IRHD9EcP2Owdd0F45ZLsixRUm6ObuxFab8EjowFNMS276MEIlUfWRyIA+x9l7nPvOTbHRWl+xQXg3 2jH/NSqM6cTolLFRRk2XaOfgZel7fFBwYWyW+jhITn9WS7FbeR1CC3OL2iIzO/PZ8f4zwOU3rXvHS Sni9tUh9Tag1x6uWAgvohg==; In-Reply-To: <20241110.164717.37865040188913982.enometh@meer.net> (message from Madhu on Sun, 10 Nov 2024 16:47:17 +0530 (IST)) 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:295181 Archived-At: > Date: Sun, 10 Nov 2024 16:47:17 +0530 (IST) > Cc: monnier@iro.umontreal.ca, 74208@debbugs.gnu.org > From: Madhu > > * 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? The idea being not to bind default-directory to the URL? Doesn't ffap need that? If not, why does it override the file handlers?