From unknown Sat Aug 16 00:30:47 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#5808 <5808@debbugs.gnu.org> To: bug#5808 <5808@debbugs.gnu.org> Subject: Status: 23.1; substitute-in-file-name $NOSUCH vs ${NOSUCH} Reply-To: bug#5808 <5808@debbugs.gnu.org> Date: Sat, 16 Aug 2025 07:30:47 +0000 retitle 5808 23.1; substitute-in-file-name $NOSUCH vs ${NOSUCH} reassign 5808 emacs submitter 5808 Kevin Ryde severity 5808 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 30 20:18:51 2010 Received: (at submit) by debbugs.gnu.org; 31 Mar 2010 00:18:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nwldy-00017D-Hi for submit@debbugs.gnu.org; Tue, 30 Mar 2010 20:18:50 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nwldx-000178-3a for submit@debbugs.gnu.org; Tue, 30 Mar 2010 20:18:49 -0400 Received: from lists.gnu.org ([199.232.76.165]:36433) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Nwldt-00019M-5c for submit@debbugs.gnu.org; Tue, 30 Mar 2010 20:18:45 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nwlds-0003KC-K7 for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2010 20:18:44 -0400 Received: from [140.186.70.92] (port=50354 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nwldq-0003Jj-85 for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2010 20:18:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nwldo-0004Vp-BK for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2010 20:18:42 -0400 Received: from mailout2-3.pacific.net.au ([61.8.2.226]:34106 helo=mailout2.pacific.net.au) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nwldo-0004VV-1g for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2010 20:18:40 -0400 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id CF0481B7E0E for ; Wed, 31 Mar 2010 11:18:35 +1100 (EST) Received: from blah.blah (ppp2AAA.dyn.pacific.net.au [61.8.42.170]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id AD87A8C4D for ; Wed, 31 Mar 2010 11:18:34 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.71) (envelope-from ) id 1Nwldo-00032n-01 for bug-gnu-emacs@gnu.org; Wed, 31 Mar 2010 11:18:40 +1100 From: Kevin Ryde To: bug-gnu-emacs@gnu.org Subject: 23.1; substitute-in-file-name $NOSUCH vs ${NOSUCH} Date: Wed, 31 Mar 2010 11:18:39 +1100 Message-ID: <87ljd9cpi8.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.6 (-----) Evaluating (substitute-in-file-name "$NOSUCHVAR") => "$NOSUCHVAR but (substitute-in-file-name "${NOSUCHVAR}") => error Substituting nonexistent environment variable "NOSUCHVAR" whereas I thought the two ways of writing a variable would be treated the same. I'm not sure if this is a bug or a feature. I see they were both errors in Emacs 21, but that 22 up forgives the first. If a feature then it'd be good if the docstring had a note explaining the difference. I'd used then first and then got bitten from the second throwing an error. The docstring might also note unpaired braces are an error (substitute-in-file-name "${HOME") => error primarily in the interests of knowing what circumstances you might have to condition-case or ignore-errors. In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5) of 2009-09-14 on raven, modified by Debian configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_AU value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default-enable-multibyte-characters: t From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 30 21:30:00 2010 Received: (at 5808) by debbugs.gnu.org; 31 Mar 2010 01:30:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nwmkq-0001YP-7k for submit@debbugs.gnu.org; Tue, 30 Mar 2010 21:30:00 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nwmko-0001YK-3W for 5808@debbugs.gnu.org; Tue, 30 Mar 2010 21:29:58 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAL1CsktLd/h9/2dsb2JhbACbJ3LAVIUABIsj X-IronPort-AV: E=Sophos;i="4.51,338,1267419600"; d="scan'208";a="59900051" Received: from 75-119-248-125.dsl.teksavvy.com (HELO ceviche.home) ([75.119.248.125]) by ironport2-out.pppoe.ca with ESMTP; 30 Mar 2010 21:29:54 -0400 Received: by ceviche.home (Postfix, from userid 20848) id EEE67660BF; Tue, 30 Mar 2010 21:29:53 -0400 (EDT) From: Stefan Monnier To: Kevin Ryde Subject: Re: bug#5808: 23.1; substitute-in-file-name $NOSUCH vs ${NOSUCH} Message-ID: References: <87ljd9cpi8.fsf@blah.blah> Date: Tue, 30 Mar 2010 21:29:53 -0400 In-Reply-To: <87ljd9cpi8.fsf@blah.blah> (Kevin Ryde's message of "Wed, 31 Mar 2010 11:18:39 +1100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -0.8 (/) X-Debbugs-Envelope-To: 5808 Cc: 5808@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > Evaluating > (substitute-in-file-name "$NOSUCHVAR") > => "$NOSUCHVAR > but > (substitute-in-file-name "${NOSUCHVAR}") > => error > Substituting nonexistent environment variable "NOSUCHVAR" [...] > I'm not sure if this is a bug or a feature. I see they were both errors > in Emacs 21, but that 22 up forgives the first. I made the change in Emacs-22 so that most uses of $ in file names can work without needing the quoting by double-dollars. It was a fairly easy change which should cover most cases. Admittedly, the resulting inconsistency is not great, so I guess that the discrepancy is a misfeature/bug, but it's not very high up the list of things to fix. Patches welcome, Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 31 14:00:58 2010 Received: (at control) by debbugs.gnu.org; 31 Mar 2010 18:00:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nx2Dq-0008Gy-OB for submit@debbugs.gnu.org; Wed, 31 Mar 2010 14:00:58 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nx2Dp-0008Gs-12 for control@debbugs.gnu.org; Wed, 31 Mar 2010 14:00:57 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1Nx2Dj-0000uY-FD; Wed, 31 Mar 2010 14:00:51 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19379.36307.342420.168332@fencepost.gnu.org> Date: Wed, 31 Mar 2010 14:00:51 -0400 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: cyan X-Ran: |xb+Qi!x3@qp^&UV8ipxV]x}wjI#jV~r]2Qrm_)s{j List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.1 (-----) merge 5797 5799 severity 5808 minor reassign 5811 emacs,ns unarchive 5365 forcemerge 5365 5810 From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 02 20:02:36 2010 Received: (at 5808) by debbugs.gnu.org; 3 Apr 2010 00:02:36 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nxqot-0001iV-WF for submit@debbugs.gnu.org; Fri, 02 Apr 2010 20:02:36 -0400 Received: from mailout1-4.pacific.net.au ([61.8.2.211] helo=mailout1.pacific.net.au) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nxqoq-0001iQ-Mt for 5808@debbugs.gnu.org; Fri, 02 Apr 2010 20:02:34 -0400 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id 9347552E258; Sat, 3 Apr 2010 11:02:26 +1100 (EST) Received: from blah.blah (ppp2AFC.dyn.pacific.net.au [61.8.42.252]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 8B6088C08; Sat, 3 Apr 2010 11:02:25 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.71) (envelope-from ) id 1Nxqoe-0001f1-Me; Sat, 03 Apr 2010 11:02:20 +1100 From: Kevin Ryde To: Stefan Monnier Subject: Re: bug#5808: 23.1; substitute-in-file-name $NOSUCH vs ${NOSUCH} References: <87ljd9cpi8.fsf@blah.blah> Date: Sat, 03 Apr 2010 11:02:20 +1100 In-Reply-To: (Stefan Monnier's message of "Tue, 30 Mar 2010 21:29:53 -0400") Message-ID: <87bpe1e73n.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 5808 Cc: 5808@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) Stefan Monnier writes: > > I made the change in Emacs-22 so that most uses of $ in file names can > work without needing the quoting by double-dollars. Sounds likely. > Admittedly, > the resulting inconsistency is not great, so I guess that the > discrepancy is a misfeature/bug, Unless it's thought of as ${FOO} is certainly an expansion, whereas $FOO is instead maybe an expansion and maybe a literal $, such as on VMS, is it? If the docstring described the way it worked that'd be enough. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 30 23:35:19 2016 Received: (at control) by debbugs.gnu.org; 1 Jul 2016 03:35:19 +0000 Received: from localhost ([127.0.0.1]:33003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bIpEc-0006wu-UV for submit@debbugs.gnu.org; Thu, 30 Jun 2016 23:35:19 -0400 Received: from mail-it0-f48.google.com ([209.85.214.48]:36765) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bIpEc-0006wi-BK for control@debbugs.gnu.org; Thu, 30 Jun 2016 23:35:18 -0400 Received: by mail-it0-f48.google.com with SMTP id a5so8353085ita.1 for ; Thu, 30 Jun 2016 20:35:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:in-reply-to:message-id:user-agent :mime-version; bh=gKL++HcJqGkrjCmlOv/CO8Jg3YGPj64a/UiyTBQMM6g=; b=ysMsDE85SUgDBApCarXYNL5dZf3nrp19PTJtgyLBui8bSO6F1Pr1WjlClZBgyPYKVQ iXlBoprUp2fTjNB3A4iwTXnQuazCt02Ns6cz3hSynuXETv8hBbfKNo5JR/jcyL2IeO0J x2QaYeELX1B6es8OcgJSFP+kiC2xQ9HP19Z6WEKJiCqquSXuITVkkG8nkEdvFwSIrnTJ z5zWseSbQZLURIlKOELzhxztsJPeXPcZTWiNmu9s8q2P6qbTwI0Z140rD9NyvtAShqEL mN/uqO5Wo045Lc1t5dZLBw+XUJWr7mxS9UvZpNLJjAQFSvCzNbwpLww6RnSp88YkNJW0 cTHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:in-reply-to :message-id:user-agent:mime-version; bh=gKL++HcJqGkrjCmlOv/CO8Jg3YGPj64a/UiyTBQMM6g=; b=J+cFUWgPdHMkLxNHBvLeW6ALsdpjBZta5BcT5dKLP2I0A5Z3mzOWQgpmYc0vX4fM+d kvuzsvYJi8csRpDsslzjW24XUkz8C37s50r7Krzmchx8Nlls85m8cha0CQ37I571CMbK 5ZRox4WjpL3YKhx36IIAXtl8RVLiPPaPXBhImTZliSR1ecXDl+BXsPyq94F5IdTf6C9D CqFM0eOHap2oPYjf4jVzzCWXPrxr31dXGwyp4iC+CWks3aliygr6vOOArke68mXaq3jq GVtRwMoceBGv9BUtZGP1R/6bIKXMRtEQoysEUmlHds2ra8/OsHkW6bURNgXfXFzM2rV6 LKRw== X-Gm-Message-State: ALyK8tK4yYC1WKzFUU4cvrrS2Ys4hvwmpp8EmuRGUUft0WejGj8L/KT/UFuzez6TzBQVXw== X-Received: by 10.36.77.70 with SMTP id l67mr25639529itb.11.1467344112867; Thu, 30 Jun 2016 20:35:12 -0700 (PDT) Received: from zony (206-188-64-44.cpe.distributel.net. [206.188.64.44]) by smtp.googlemail.com with ESMTPSA id 41sm5281229iod.43.2016.06.30.20.35.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jun 2016 20:35:12 -0700 (PDT) From: npostavs@users.sourceforge.net To: control@debbugs.gnu.org Subject: Re: Status: 23.1; substitute-in-file-name $NOSUCH vs ${NOSUCH} Date: Thu, 30 Jun 2016 23:35:19 -0400 In-Reply-To: bug's message of "Fri\, 01 Jul 2016 03\:30\:53 +0000" Message-ID: <87wpl6ghe0.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) found 5808 23.4 found 5808 24.3 close 5808 24.5 quit Seems to have been fixed sometime after 24.3 such that (substitute-in-file-name "${NOSUCHVAR}") ;=> "${NOSUCHVAR}" without error. From unknown Sat Aug 16 00:30:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 29 Jul 2016 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator