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, 24 Nov 2024 09:19:47 +0200 Message-ID: <86v7wdjdyk.fsf@gnu.org> References: <86msi7ljb0.fsf@gnu.org> <20241110.123007.483734644166546380.enometh@meer.net> <20241111.074725.1221470735788072992.enometh@meer.net> <864j3ym915.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32429"; mail-complaints-to="usenet@ciao.gmane.io" Cc: enometh@meer.net, 74208@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 24 08:20: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 1tF6uu-0008Jb-5Z for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Nov 2024 08:20:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tF6uf-00015D-9z; Sun, 24 Nov 2024 02:20:09 -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 1tF6uY-00010p-Vg for bug-gnu-emacs@gnu.org; Sun, 24 Nov 2024 02:20: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 1tF6uY-0005CN-Fr for bug-gnu-emacs@gnu.org; Sun, 24 Nov 2024 02:20: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=krAurI3Y9M8h3TV8Yk1ZCG+fjgECZm+loc/Y72uX/so=; b=J6ZpxnknBlrfFT7GL5O266FskljUrVH/2Jrk9EdgEB2vTRuP43wD4aIlFh8TouRZ2RhYI3tk2szB2fs5WM0WrBt/yRDMQAQVz0debegbEYjwABBFR1SOy3UKwX3CubkEs7/SBItknqLQWlLVtESFsrKckTN42UKN3AodId8jXmc0nE6i8CyJiIjV+H6OnX/2YR6ENLjK3FJpcHwdY+viY7oCCFDuKaeEv5InD47Es7jvAXAkveAuXYvPugxdTEXAmJOKPVjPsOct+yXnNfHGOj/zTAyCTNmuqNFj36wW25M/Ea3fQ8FXiejhbL1UeLBrrVj4Gn3v8R5ldkSJ/qktEA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tF6uY-0002gc-8u for bug-gnu-emacs@gnu.org; Sun, 24 Nov 2024 02:20: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, 24 Nov 2024 07:20: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.173243279710305 (code B ref 74208); Sun, 24 Nov 2024 07:20:02 +0000 Original-Received: (at 74208) by debbugs.gnu.org; 24 Nov 2024 07:19:57 +0000 Original-Received: from localhost ([127.0.0.1]:60525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tF6uS-0002g6-WE for submit@debbugs.gnu.org; Sun, 24 Nov 2024 02:19:57 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tF6uR-0002fm-At for 74208@debbugs.gnu.org; Sun, 24 Nov 2024 02:19:56 -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 1tF6uL-0005AV-Ss; Sun, 24 Nov 2024 02:19:49 -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=krAurI3Y9M8h3TV8Yk1ZCG+fjgECZm+loc/Y72uX/so=; b=QlH70vvIMqd1 baL4ICPHTebcYO9H0I89tWxm3DHTg05vpxI7Az7u0gWHOF2sC7N0kQAeOLZ0PwFPEU97Ztm2itoF9 N/n2cLUmW5sWCFp8Ben8i+yt7+qn4BMVxILll2tG1JrGAV58U4EoF+pOf3OCk+LPXopYzfx/3JQug uN9TBv2HrL5N5YpGr4stMv00PC0HchjKMMmbBHVgrAdiDR6rw/UgEEEpJ48AKwLO3nnLNSBktlxXE 8NB3Xonw3Gssl0gJ5WfmoqaifxPBbg0NN6ERJ9qyRlsPvlOGHprV4T8+fr9D7zuetlpoXdJ1D8kWX XTKuK2KTUecx3ePU4wzW8A==; In-Reply-To: (message from Stefan Monnier on Sat, 23 Nov 2024 22:00:16 -0500) 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:295891 Archived-At: > From: Stefan Monnier > 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?