From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id eNzELM9VeGSVUAAASxT56A (envelope-from ) for ; Thu, 01 Jun 2023 10:24:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id eODtLM9VeGRD2AAA9RJhRA (envelope-from ) for ; Thu, 01 Jun 2023 10:24:47 +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 9052CE985 for ; Thu, 1 Jun 2023 10:24:46 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q4dbl-0004gc-V2; Thu, 01 Jun 2023 04:24:33 -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 1q4dbh-0004g8-GW for emacs-orgmode@gnu.org; Thu, 01 Jun 2023 04:24:29 -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 1q4dbc-00014u-TL for emacs-orgmode@gnu.org; Thu, 01 Jun 2023 04:24:29 -0400 Received: from mail.skyguard.com.cn (unknown [172.21.23.75]) by smtp.secgator.com (SkyGuard) with ESMTPS id 4QWzgj63CQz1VZJ; Thu, 1 Jun 2023 16:24:17 +0800 (CST) Received: from [10.0.0.10] (unknown [111.196.130.232]) by mail.skyguard.com.cn (Postfix) with ESMTPSA id 4QWzgl0xd3z2x9y; Thu, 1 Jun 2023 16:24:19 +0800 (CST) Message-ID: Date: Thu, 1 Jun 2023 16:24:11 +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> From: Pan Xie In-Reply-To: <87pm6fbnlo.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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685607887; 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=UbTXYbhJWTgtEFDj4fkSJmTy9ov+PYx+N7Fy8x7lnj8=; b=UUkcVKbRKHfKu0UJzEDL8wGaiFYrBXsQhkebvzzVB5iBvDjc7RkKOgSt94oYXuO1i6CxYc fippcnaqHU+M9xADsmzFbrPSb8iUucy97MnHBtZDmgxZxNxSRQSv3F5PjplLS7C97qVmip 7WkPSzlsOpH8mJ3DWziAML3ZWqpugDrxO503b29w7iUFBFT6rUBS7MNHIAH7OciOal/pk4 q9P8wHNmNBNgakT8YDE1rDMTSPn32sYZxg/+PGyV02gXNaBnvE26VM6l3SXD/g1GMVJFxy YHjnES2JmYXpafC66ib8Jd1Gu+/4rhZYJRryGmsmtU7p8m3J3KU31iX0Z8K2bA== 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-Seal: i=1; s=key1; d=yhetil.org; t=1685607887; a=rsa-sha256; cv=none; b=uW38+4Vt8EXvtAApV5+SajDyDXzgDU/oMSTBiBgULkapA6l8E42NuiQKe7t/FmdRt539OV xG2lnB+o5xN57PKUGqx5HRWtgBJOXr6ueirJkGpQg0lunmANx5ikqYvdfb434v7EVWs5nF EPHra8aEYWiREqiqOxAFQLrdL9W2R5wA5ybC8p/T23Hr8LgTE/z8vQhZXeSb2s71oD/Ozg f6rzCaYbZrgv61vBjLtmmnbl8ABY1hypwcUOO9dbVM1n/YZIKYwU5nkgTjjGSYzdpTNNIh 2JiO0SQ75weNu5wEEE9I3oCVdil/fnWYNGZQ1lpkAGYVK+gEnxrsrIBWkVQv5w== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: 0.34 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-Queue-Id: 9052CE985 X-Spam-Score: 0.34 X-TUID: +tzi6IHQXHyF 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. On 6/1/23 16:20, Ihor Radchenko wrote: > Pan Xie writes: > >> Fantastic!! Thanks for your help. I can remove my ugly override codes. >> >> BTW, Please keep in mind that the org export codes also need to >> substitute the environment variables. My proposal only works for the org >> file itself, When exports the org file to html, the image file path will >> still include the environment variable, which is of course not correct. > It may or may not be correct. > For example, when exporting to Org (ox-org), one may want to keep the > environment variables. > > If we add this feature for export, it should be an export option. > It will also be a breaking change. > > I generally feel that it should be reasonable to go ahead with this > breaking change, possibly disabling variable resolution for ox-org only. >