From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 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 11:54:36 -0500 Message-ID: References: <20241110.062700.1848871414792572122.enometh@meer.net> <86msi7ljb0.fsf@gnu.org> <20241110.123007.483734644166546380.enometh@meer.net> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36720"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: eliz@gnu.org, 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 17:55:24 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 1tABDf-0009RC-Vl for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Nov 2024 17:55:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tABDN-0005vj-2R; Sun, 10 Nov 2024 11:55: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 1tABDL-0005ty-Il for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2024 11:55: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 1tABDK-00058r-KD for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2024 11:55:03 -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:Date:References:In-Reply-To:From:To:Subject; bh=8bYiXhuyLGfz7skgWFyqqCN9QzEOLBuszoO9LMd/tvE=; b=q3ClxRvU0Lq6Hf21XPiT+n5IdP803n1tpzdDg+cS6V3cCE8dZFRGPS575hKGXCfobQzY4prk2buwrZOdulX5jUzsua/Zxx9jXdrjUE2bQYN6UP9nrQ8JoAWND85kG2oFfMwjFe/g1GjQODyllfV1Cn/jxj0YU8nk6i0r15ASUqVniJixMJ7Ss5LoDaDTs9xjBl1uyCTJS0AsIIKKlnlxyR/jhWShPxil5FACbcVHFZHmwSe4bokTqBjzQPukYAc1UJwFe95wStXVP/Z7iBy0ypyMbFQNzO0rasiwtTjoFqP08Vzw4X8R4FZsrTqYSZrsAhEX1oNEUjsglmNb3Aeq6Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tABDK-0002cx-Fo for bug-gnu-emacs@gnu.org; Sun, 10 Nov 2024 11:55:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Nov 2024 16:55: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.173125768610067 (code B ref 74208); Sun, 10 Nov 2024 16:55:02 +0000 Original-Received: (at 74208) by debbugs.gnu.org; 10 Nov 2024 16:54:46 +0000 Original-Received: from localhost ([127.0.0.1]:56430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tABD4-0002cI-BD for submit@debbugs.gnu.org; Sun, 10 Nov 2024 11:54:46 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:39223) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tABD2-0002c4-3A for 74208@debbugs.gnu.org; Sun, 10 Nov 2024 11:54:44 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id B2DB98099D; Sun, 10 Nov 2024 11:54:38 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1731257677; bh=2rBs12x+ESmgDhqKxYJfI5zvrOKu2Vx3q2cJNtBOxbk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Pb0W9gOSY46wAq/PUFyU3xisqCclon1Uy3EezK4UbDTmWjYgTH42TCIfpwN6/im6g 9V8BjwPZpstNlNSXrWNDrLa5PQMvYGS0TEQULjF55YpIv87YhNlUKoiz6utPm69VAK gAZlvJwpVeJMmwBdbs/17mI9UmODFIQgfxxYvCN4IKo/vhOjes9qgrbJL+x2BMtMhm +amHt0shHslwQ8umyrJ7XzkjYMAesHnQJpvKcwmi2rpTf6tg1Z6ky+K6OhZpYZlSfA Hg+kaxSbc4RjG9ob8GF6iQhD716T8CuVqGd8hlVl2oDBwBfCslTd0a+QeSxXcHgrgO yiKtkOJ5DB4yA== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id C691080964; Sun, 10 Nov 2024 11:54:37 -0500 (EST) Original-Received: from pastel (104-195-225-43.cpe.teksavvy.com [104.195.225.43]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9416E1204E5; Sun, 10 Nov 2024 11:54:37 -0500 (EST) In-Reply-To: <20241110.123007.483734644166546380.enometh@meer.net> (Madhu's message of "Sun, 10 Nov 2024 12:30:07 +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:295193 Archived-At: > for the example in the thread, > ffap.el:(ffap-read-file-or-url) calls read-file-name-default, via > (funcall #'read-file-name-default prompt guess guess) => > > read-file-name-default("Find file or URL: " "http://example.com" "http://example.com") > > (read-file-name-default PROMPT &optional DIR DEFAULT-FILENAME > MUSTMATCH INITIAL PREDICATE) > > The problem is that the parameter DIR == "http://example.com" was > getting bound to default-directory with undesirable results. It can also have desirable results sometimes (depends on the URL at point and what kind of support for URLs you have in your Emacs, admittedly). Do you happen to have a more realistic scenario than your "echo foo" that lets us better judge the severity of the problem, and maybe other ways to solve the actual problem? Stefan