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 UDeHHq7ld2SrVAAASxT56A (envelope-from ) for ; Thu, 01 Jun 2023 02:26:22 +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 uFuMHq7ld2QTDQEAauVa8A (envelope-from ) for ; Thu, 01 Jun 2023 02:26:22 +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 80CE830183 for ; Thu, 1 Jun 2023 02:26:20 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q4W8B-0005vr-AJ; Wed, 31 May 2023 20:25:32 -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 1q4W81-0005tB-PW for emacs-orgmode@gnu.org; Wed, 31 May 2023 20:25:23 -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 1q4W7x-0003Fw-Us for emacs-orgmode@gnu.org; Wed, 31 May 2023 20:25:21 -0400 Received: from mail.skyguard.com.cn (unknown [172.21.23.75]) by smtp.secgator.com (SkyGuard) with ESMTPS id 4QWn2m33qKz1VZJ for ; Thu, 1 Jun 2023 08:25:04 +0800 (CST) Received: from [10.0.0.10] (unknown [111.196.130.232]) by mail.skyguard.com.cn (Postfix) with ESMTPSA id 4QWn2n0ljWz2xCp for ; Thu, 1 Jun 2023 08:25:05 +0800 (CST) Message-ID: <09abec27-155b-e0d8-ed31-ff0e0d450764@skyguard.com.cn> Date: Thu, 1 Jun 2023 08:24:58 +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: emacs-orgmode@gnu.org References: <7a012430-6084-e693-1a86-f14d0512bebc@skyguard.com.cn> <87cz2goqn2.fsf@localhost> <9105a5ca-764f-126f-a01e-2cb92c2035dd@skyguard.com.cn> Content-Language: en-US From: Pan Xie In-Reply-To: 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-Seal: i=1; s=key1; d=yhetil.org; t=1685579182; a=rsa-sha256; cv=none; b=Om0Jc6Aal/pPP04lasTgB13zoWAfw0v/zc5KSKfJV1u2mIU+N36d3Pb0KZeA/9lNkbUdr8 mKFQNha9hoCU6bjE4AkHdwCVnts26SihDgFctSzvf/p3uApkt9p+t/DuAeO+dJ0bfqZ8Gp XXO+Ek298vCKi5Le+KDCeDBnIhXsUJcHqVdfm7RgAf4C1PYtTccuTdZKXdgJky2MJMN3Zh 7B4NtuHOZC1FXC7RIp7ney6Z2HIiMQWl4q7h6AD6UDqH3Py7OphhlRy7Wy63ZQR+zSNWCU YHxhKIZvKLgG01rHFQNh/DKL5nygqdGwx0YbuG615CRual7j8J6QDeizSQ2+Gw== 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=1685579182; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=z2eJQu3r+vCkeFrf7nN3Xwag+ihy0mJLkX7KoXQPNl4=; b=JFMncAkszs++TEsy2nUQEMRrgkUOFfrpRQ0ujnfcA3sem3Brv0i8zUVDcVO9La9DasPF+c rcnfaJFbefN8wAhtyGyz48c7XkLNwbqdDzH0GVzvby/Z+8u1VVvYeXKn/yBvHW3L3SGTq4 lm7i1via07g+CyAAvTXfHjaXN11HqzhEr0FvaqYRgdprdjoqa8uYfY1ubbB8iWiDFdx7L/ Dte2XINWQ5NQdUspjn1YR1PG/qCu1dfzMPrumNfuXyGif8LQMir3UITsk/yU+hnbhts1TY b+dpp3rTuQXifKZHBzMbuv4+i29FuAFfNID0RM04+0E1ax1omxRt4aLGOvyfYA== 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: 1.85 X-Spam-Score: 1.85 X-Migadu-Queue-Id: 80CE830183 X-TUID: I+ku4K0YFCXO I think that depends on whether the linter will verify the existence of each file path. Strictly speaking, it should, thus the org-lint also need changing. On the other hand, if the tool just verify the grammar of the org file itself, then it might be OK without changing. I never use the linter before, might give it a try sometime. But the export functionality definitely need changing, otherwise the images won't be shown in exported html (or other format) files, and someone will report a bug. On 6/1/23 08:12, Samuel Wales wrote: > org-lint might need changing too? > > On 5/31/23, Pan Xie wrote: >> 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 >>> >> >