From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#47790: 27.2; XDG_DATA_HOME evaluation in move-file-to-trash Date: Sat, 24 Apr 2021 13:19:46 +0100 Message-ID: <87wnsr27tp.fsf@tcd.ie> References: <871rbcnfb5.fsf@posteo.net> <83y2dkx8ke.fsf@gnu.org> <87y2djn7st.fsf@posteo.net> <874kg7zqz6.fsf@tcd.ie> <83v98nybw7.fsf@gnu.org> <87v98cuowx.fsf@posteo.net> <878s58t0d0.fsf@tcd.ie> <87o8e3c3xa.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37963"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 47790-done@debbugs.gnu.org To: Thierry Volpiatto Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 24 14:20:12 2021 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 1laHGe-0009jq-5L for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Apr 2021 14:20:12 +0200 Original-Received: from localhost ([::1]:34818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1laHGd-00009a-8u for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Apr 2021 08:20:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1laHGV-00008x-OE for bug-gnu-emacs@gnu.org; Sat, 24 Apr 2021 08:20:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56335) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1laHGV-00075d-Gk for bug-gnu-emacs@gnu.org; Sat, 24 Apr 2021 08:20:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1laHGV-00019N-Bs for bug-gnu-emacs@gnu.org; Sat, 24 Apr 2021 08:20:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Apr 2021 12:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47790 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 47790-done@debbugs.gnu.org id=D47790.16192667964387 (code D ref 47790); Sat, 24 Apr 2021 12:20:03 +0000 Original-Received: (at 47790-done) by debbugs.gnu.org; 24 Apr 2021 12:19:56 +0000 Original-Received: from localhost ([127.0.0.1]:39645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laHGO-00018c-An for submit@debbugs.gnu.org; Sat, 24 Apr 2021 08:19:56 -0400 Original-Received: from mail-wm1-f53.google.com ([209.85.128.53]:38638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laHGL-00018B-ON for 47790-done@debbugs.gnu.org; Sat, 24 Apr 2021 08:19:55 -0400 Original-Received: by mail-wm1-f53.google.com with SMTP id d200-20020a1c1dd10000b02901384767d4a5so2605609wmd.3 for <47790-done@debbugs.gnu.org>; Sat, 24 Apr 2021 05:19:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=PCS2937dghX7ipVlJMjLRoRiYyjxzeGemqJCQfzyFjs=; b=d3w4864HT+pyNkzNfcAOjBwQlxZpHgo5bWRlOhQHxlVmd3eTknxZHctOHiG+klCsr/ 8STryv+o0ZS4TtbnRSCPGry5iAAhclT+1OnbeAYhJiyencBiDtWpll43ERV/7vJiIvaq LQCG3WrhEQK7gumUHLq5hbzjtvYwq27YwC652AojHQSvsKIlmsSaGb1GhrYzfYx93rv6 zyhhOkl0lPcTEsqWK7Ha0rVV0b2sPdJU/9vLyp7rhGa6wnYahCay60LzBMhQIpJS1EmH 4tns6ZrIheD/j2iNHgt3XCOLRYliPFdQo2GnD/L6tSDOF9YG47z1UKnEfjSNy/CY1LTC VFYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=PCS2937dghX7ipVlJMjLRoRiYyjxzeGemqJCQfzyFjs=; b=gfOGm6BPwKaXz1xKhm84V5WUDU1iTrS9t6qDuqV1c0CgsJqJOHP3KHlYfIEiUQ3Phy 7/pBXLzU9P7MQqFSWNwakqgQs0QpbUOfylrIcmItpGzJ5LXpIwCJDfasQfgRI0pQU/O5 0H3lbE8qIfreXdXdQ1gMyc33+6OYt/6BEEzgxi7qkZ+IRLM+mehOOSzaoIDt7Enk4Nxr No0LiVHaA4Vwrp8+8BSwjJ+6yxgSqErhXnMhl2cgrXH5gGr3kijoFnBa/flpmu3vAM2X L2Dnj1zsPPKoW8mAiSCxEZB3dohyxtGBr0uLqySUVW1OqtzJOyczUfy25etVX++eBwMJ hO/Q== X-Gm-Message-State: AOAM5332iljrp82YGBbRF+fhPtvA9Zd4BFjtDs6qiwwyzpMCD9O4A9PK OzFcVnNLVTy/FLRbKyW1RC4gYg== X-Google-Smtp-Source: ABdhPJz9JztQaukf4Ye/tRf0RJBOCiOO0IeH2FoPY8BQeiakLmeVzfnk3GqjSaFpUiMd+NqrbA3vZg== X-Received: by 2002:a1c:c910:: with SMTP id f16mr10751546wmb.136.1619266787892; Sat, 24 Apr 2021 05:19:47 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1]) by smtp.gmail.com with ESMTPSA id p13sm14298863wrt.0.2021.04.24.05.19.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Apr 2021 05:19:47 -0700 (PDT) In-Reply-To: <87o8e3c3xa.fsf@posteo.net> (Thierry Volpiatto's message of "Sat, 24 Apr 2021 11:30:06 +0000") 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" Xref: news.gmane.io gmane.emacs.bugs:204796 Archived-At: tags 47790 notabug close 47790 quit Thierry Volpiatto writes: > "Basil L. Contovounesios" writes: > >> Thierry Volpiatto writes: >> >>> Eli Zaretskii writes: >>> >>>>> From: "Basil L. Contovounesios" >>>>> Cc: Eli Zaretskii , 47790@debbugs.gnu.org >>>>> Date: Thu, 15 Apr 2021 13:12:29 +0100 >>>>> >>>>> IME when someone says "set FOO to $HOME/.foo" without any further >>>>> qualification they are implicitly referring to the expansion of >>>>> $HOME. >>>> >>>> That's what I knew, but Thierry seems to say otherwise. >>> >>> Well, it is common to set PATH like this: >>> >>> PATH="$HOME/bin:$PATH" >>> >>> you find this in ~/.profile or ~/.bashrc on many distros. >> >> Any variables enclosed in double quotes "..." are expanded when this >> expression is evaluated by the shell. >> >> You can confirm this by running 'echo "$PATH"'. > > I already know this. > >>> I didn't find documentaion about this though. >> >> See one of the following: >> - 'man 1 dash', headings 'Double Quotes' and 'Parameter Expansion'. >> - 'man 1 bash', headings 'QUOTING' and 'Parameter Expansion'. >> - (info "(bash) Double Quotes") >> https://gnu.org/software/bash/manual/html_node/Double-Quotes.html > > I know this as well... but this is unrelated to the problem you have in > emacs. I never said it was related, but you used these shell examples to argue that Emacs should expand shell variables present in environment variable strings. I was pointing out that your examples imply the opposite: that the shell expands the variables long before they enter the environment (equivalent to the use of substitute-in-file-name in the OP). So Emacs is not necessarily behaving any differently to other programs that query their environment, based on these examples. >>> Anyway the problem is if one do this with XDG_DATA_HOME and trash files >>> from different directories, a copy of his home directory will be done in >>> each of those directories under literally "$HOME/user". >> >> But this only happens when you set XDG_DATA_HOME to a string that >> includes shell variables, right? If so... >> >>> If you consider this is fine and normal you can close this bug report. >> >> ...then I don't think that was ever implied as being supported, and I >> don't see the need to support it, but that's just one impression. > > Fair enough, so you can close this. Thanks, done. We can always reopen it if new information comes to light. -- Basil