From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id IP3kJVdZeGQBPwEASxT56A (envelope-from ) for ; Thu, 01 Jun 2023 10:39:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id ML0KJldZeGTvhgAAauVa8A (envelope-from ) for ; Thu, 01 Jun 2023 10:39:51 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 599C19A6B for ; Thu, 1 Jun 2023 10:39:51 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q4dpr-0002aE-LL; Thu, 01 Jun 2023 04:39:07 -0400 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 1q4dpo-0002a3-AO for emacs-orgmode@gnu.org; Thu, 01 Jun 2023 04:39:04 -0400 Received: from mailxcu.skyguard.com.cn ([210.12.103.1] helo=smtp.secgator.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q4dpi-0003zI-Hm for emacs-orgmode@gnu.org; Thu, 01 Jun 2023 04:39:04 -0400 Received: from mail.skyguard.com.cn (unknown [172.21.23.75]) by smtp.secgator.com (SkyGuard) with ESMTPS id 4QX00Q0HmKz1klH; Thu, 1 Jun 2023 16:38:46 +0800 (CST) Received: from [10.0.0.10] (unknown [111.196.130.232]) by mail.skyguard.com.cn (Postfix) with ESMTPSA id 4QX00R27Qfz2x9y; Thu, 1 Jun 2023 16:38:47 +0800 (CST) Message-ID: <73ace84b-5258-0679-1b9c-deef021d7b79@skyguard.com.cn> Date: Thu, 1 Jun 2023 16:38:39 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [FR] Should we resolve environment variables in the file link path when exporting? (was: [FR] Please add environment variable substitution in `org-display-inline-images') Content-Language: en-US To: Ihor Radchenko Cc: emacs-orgmode@gnu.org References: <7a012430-6084-e693-1a86-f14d0512bebc@skyguard.com.cn> <87cz2goqn2.fsf@localhost> <9105a5ca-764f-126f-a01e-2cb92c2035dd@skyguard.com.cn> <87pm6fbnlo.fsf@localhost> <87ilc7bmw2.fsf@localhost> From: Pan Xie In-Reply-To: <87ilc7bmw2.fsf@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=210.12.103.1; envelope-from=xiepan@skyguard.com.cn; helo=smtp.secgator.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.091, RCVD_IN_SBL=0.141, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685608791; a=rsa-sha256; cv=none; b=PiuCS+hlaJobJ/sJltrb3IFtWXBB3KlzC+Lx1WtELZce50MkYyBzIi8rfzvDgixZBgce5l IT3dnQjwbRqPhd+TWAiph+/6/FIKJ+aW8XEuP7sVsVFC2MAmydP2744hjubpXWx3DZvela h9HzlaBwpIsFBrFh8fZI+sKxaiSdTHbtoIpWn8hR3tuA67O/l0OjS98WPA6SlopiXLF+5x AsqT+ccs7DefUTmfTbKjLXWdA33jPQ6v/y+nj7h7GODSieBFDj/xxfZn2gaslV+5Wqr75P pTwxbozMXcyA2g3/r8JylGyc11tmzQQ/plKJxF4J5CsP6/yUapsMDt2grQzWgA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685608791; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=VmjwiCxvwwNXr0nvbmMMg0U1mMJbbKF0W1HpwEfAQ+0=; b=Q8nvD1WlY9+tAv7sQ2NTgs7uiPNvOo8xx9/HuccY0yUnjU/c88GLtVS3Uy8fW0QdnY9e9l iZKSgfBtXqVXLpl0HjKv+W3PZHuakGVhGgxEn5/F25LQcyxczLVllpqh7ucEr0lXOaLzbH qmUgI5r0i1bDO0OEOqY5YeRtLfXBSEimLirLVbCC0HwgSNhDifzYlOr57DOyHQSEeg2ZP+ fPR/qWMnHwHz7rney2qUENWI6PFrfbVu85MQT++BvcJmZXLcmq3//LnfUXanstIZNyDRqm JEWYhx1hDSP1+0VF9S1cnuex5S/8Ic4Uh6oUpDGBr5XczlZGnzgdptt5xsc6Yg== Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -0.16 X-Spam-Score: -0.16 X-Migadu-Queue-Id: 599C19A6B X-TUID: LpDEpYf6S0qa Oh, that path will be horrible! Variable substitution is really important since it is an abstraction to make the same org file works on different hosts with different path hierarchies. I believe there are lots of users already rely on it, even without being documented. The reasonable thinking would be supporting more substitutions, rather than remove any. On 6/1/23 16:35, Ihor Radchenko wrote: > Pan Xie writes: > >> I think we need keep consistent with the file link. Since file link will >> substitute the environment variables in its file path, I guess it will >> do the same thing when export to html files. It may keep the variables >> when export to Org (ox-org). Since both image link and file link are >> links, from user's perspective they should be consistent. > This feature is not even documented. We may as well go other way and > remove variable substitution from the file links and keep the rest > unchanged. Not that we have to. But I think that the topic is worth > discussing first. >