From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id QD5XAvJTeGSArAAASxT56A (envelope-from ) for ; Thu, 01 Jun 2023 10:16:50 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id eP2CAvJTeGQ0ygAA9RJhRA (envelope-from ) for ; Thu, 01 Jun 2023 10:16:50 +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 748E027004 for ; Thu, 1 Jun 2023 10:16:49 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q4dTT-0000jQ-6d; Thu, 01 Jun 2023 04:15:59 -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 1q4dTR-0000ij-E9 for emacs-orgmode@gnu.org; Thu, 01 Jun 2023 04:15:57 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q4dTP-00083x-Bl for emacs-orgmode@gnu.org; Thu, 01 Jun 2023 04:15:57 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 49C8B240108 for ; Thu, 1 Jun 2023 10:15:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1685607351; bh=kB19RxASuxXS10VRtuFFlSWo0at535m2NI61ihJF/t8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=dyhWN/s3PhZq6HMQilLE+gO/0UkXK3P/Mj+9wE8A7kAncXuhIXI+HaEswS8D/T+dP pgjbwXbCCi4VAWjV3iHQjJsZN2QxT65bMpvpYSonAzmdh0o6YXCfLQ4GkPJpYiQ6IN pwcuZ/WOTdRA18TyvnPMHxOQ5u1PWgoQne9IyHJXfX0rfXeD9rO/K3++te1kpNOgwA oa5+4OBlhIr7ZSi/FicMrb4eJ1wBzvbe7fIdyK7J1Gp+YQQeFR8oJ3vOcMNhLYV8Ht DuG6USZCa5aWiJt9v7gSlkVH690BO6/uISvoACxBUttSBkwR2oJ2bd3nRjp7DwEFVV /drsn+/wh8Caw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QWzTy6cmjz6tvc; Thu, 1 Jun 2023 10:15:50 +0200 (CEST) From: Ihor Radchenko To: Pan Xie Cc: emacs-orgmode@gnu.org Subject: [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') In-Reply-To: <9105a5ca-764f-126f-a01e-2cb92c2035dd@skyguard.com.cn> References: <7a012430-6084-e693-1a86-f14d0512bebc@skyguard.com.cn> <87cz2goqn2.fsf@localhost> <9105a5ca-764f-126f-a01e-2cb92c2035dd@skyguard.com.cn> Date: Thu, 01 Jun 2023 08:20:19 +0000 Message-ID: <87pm6fbnlo.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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=1685607409; a=rsa-sha256; cv=none; b=HHU0pCeLJ7pzkm3Ktmv8OTghDbngqHkm5KKkh/6oqYO6DuRa8g2nDXvsZqYndbTOfg4/wy hUUrEiS7STM9xh1rnAzN/JAhBC+d86eXt7NvMBDtKvxaYKInF2F7K12Hg+UBwi6szX8/kl 50RfXjm/CYrI9engwarUubss/XLmJk4fGVuXhuzXgEADVVmOCSkcTQ8c+T+s1Yi9nS/Wzs AfucCgFflrF7GBH9CI2wnW1TsUhP7Yw8i4beLiofGDKmQs2im8Xibbm6kbYx3dCcilFShE PMppS0Zeh6ApPHN8fTm70QQa92H34JIhg3LWYN/l4jRNh48yitOZ5AL3uhUwcg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="dyhWN/s3"; dmarc=pass (policy=none) header.from=posteo.net; 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=1685607409; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=q1hECIlAWS9pPgovlhrzvYyZ8iTotDHeMUJULc3yfEA=; b=Bxy5u7gb6kaJATWOpoOsORAaO8uqgIuG2aEIeiJa6jpXQKgxVN6VL4pVojUhS9TIq3+a6T hKAt/PWTv55EhCm1EAsmnEyUYFmPeuUE0IyWni1S1zgAq4eAatRV4QLFA3per6bj9y/cdd nH+I/0tevnb6Q4Zem2lyNaiB7eesrPFmeiyQLprB1TjBt+riUa4raQYF6flQ+USGE6dvtx cXpg1j9yDfJN9e+fZsok2lw5npRQ+qogZS0xTZDaICUD1fD4CKw++Gg7m6BbTXRlfAp9Lq XuyvCk+RfEUTrH6Us4jHpjihpcXiBmVKs5qLbIfJCAwAeh4oHDU2HicGRptOXQ== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="dyhWN/s3"; dmarc=pass (policy=none) header.from=posteo.net; 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: -11.12 X-Spam-Score: -11.12 X-Migadu-Queue-Id: 748E027004 X-TUID: l/ncm0PZEM// 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. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at