From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 oDABM3xUd2QmZgAASxT56A (envelope-from ) for ; Wed, 31 May 2023 16:06:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id mLoGM3xUd2SBRwAA9RJhRA (envelope-from ) for ; Wed, 31 May 2023 16:06:52 +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 055A53EFD3 for ; Wed, 31 May 2023 16:06:52 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q4MSd-0001De-Ve; Wed, 31 May 2023 10:05: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 1q4MSb-0001DA-IG for emacs-orgmode@gnu.org; Wed, 31 May 2023 10:05:57 -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 1q4MSY-00071r-In for emacs-orgmode@gnu.org; Wed, 31 May 2023 10:05:57 -0400 Received: from mail.skyguard.com.cn (unknown [172.21.23.75]) by smtp.secgator.com (SkyGuard) with ESMTPS id 4QWWHx5sNBz6Kbd; Wed, 31 May 2023 22:05:33 +0800 (CST) Received: from [10.0.0.10] (unknown [111.196.130.232]) by mail.skyguard.com.cn (Postfix) with ESMTPSA id 4QWWHz6B3gz2xHc; Wed, 31 May 2023 22:05:35 +0800 (CST) Message-ID: <9105a5ca-764f-126f-a01e-2cb92c2035dd@skyguard.com.cn> Date: Wed, 31 May 2023 22:05:29 +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] Please add environment variable substitution in `org-display-inline-images' To: Ihor Radchenko Cc: emacs-orgmode@gnu.org References: <7a012430-6084-e693-1a86-f14d0512bebc@skyguard.com.cn> <87cz2goqn2.fsf@localhost> Content-Language: en-US From: Pan Xie In-Reply-To: <87cz2goqn2.fsf@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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=1685542012; 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=84HbPAodP1Ij7IiwOaWfzcBZfTlWposdCELAXhLabiw=; b=WKAyrHyl273Z3b236qLK/M83kG6P56fagkoNGgsGLNYrsEkuWDatm07TD3vRuwG9Nj0ila iW5iq0BhEqmCHcQaRyYYaB7X8OQFtUnBlftLS322zjeGnL1R04qERGYDkXLBXhLbisYQwh NQTCJLN2Z2NbmVjlRcJvDmCiOQDSSdbt1lRj0TG+H1VP7Y97DkRoRc6ySeTS4k8ZeV+fqT Of/kIe/32LZZmtqJm7asH/mVhYu2+/XtxqG5JvUHfvutE4EVsiVrUZ0iQsEs9UMuJRqVtn 6DUrmFuQZ0DQFw/z0ULxqUu/3g23KmyoIWNDoq4AZqDjF7cqwcTw6pfqwBzGNg== 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=1685542012; a=rsa-sha256; cv=none; b=BzHY45dO5MWYqf8IPoLESEsszyePt17YeUdkl8TwMrAT/jMn7kCc14hSsN0+fZl0ORuiOl YIumBGA5n50y2rTBMZpA6x7lU3iBwC/HEmPr2RnuxGHpyS45Wn/+263twk8RrbeY8bMRXv xFmtofyxUWpIeW38oMuDIwy1nkk/VI7Rdhh37ARYH3BPkg6fBIccCwWiu6sx0dzezMag2R S+1sm+4D8MHpFxZT8vEdMOJwgW41PS9EItKsqWCAl/SvxvtnNyRu+Jwp1b9o44UHtj6Eix OM5JCcYD2pq1o32hvVluNf6giCjTa0xeJSjSjqORRkSj4xKGO5YW+nHVp+YwDg== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: 0.35 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: 055A53EFD3 X-Spam-Score: 0.35 X-TUID: 8sz/wdRC+CtI 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. On 5/31/23 16:24, Ihor Radchenko wrote: > Pan Xie writes: > >> I recently found that the environment variable substitution does not >> apply to inline image paths. Supposing I use a path >> “/home/pxie/$Gallery/” to store all my image files, “$Gallery” >> should be substituted with its corresponding value. The file link DOES >> substitute the environment variables, but inline image paths not. So I >> think it is a reasonable demand for the consistency. > Agree. > Done, on main. > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3123caa8e >