emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Pan Xie <xiepan@skyguard.com.cn>
To: emacs-orgmode@gnu.org
Subject: Re: [FR] Please add environment variable substitution in `org-display-inline-images'
Date: Thu, 1 Jun 2023 08:24:58 +0800	[thread overview]
Message-ID: <09abec27-155b-e0d8-ed31-ff0e0d450764@skyguard.com.cn> (raw)
In-Reply-To: <CAJcAo8su_74Ukw7zNiM3BNRBQLEK99OdpKtqfnNY=+-3bkYNnQ@mail.gmail.com>

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 <xiepan@skyguard.com.cn> 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 <xiepan@skyguard.com.cn> 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
>>>
>>
>


  reply	other threads:[~2023-06-01  0:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-28 13:53 [FR] Please add environment variable substitution in `org-display-inline-images' Pan Xie
2023-05-28 14:21 ` Ruijie Yu via General discussions about Org-mode.
2023-05-31  8:24 ` Ihor Radchenko
2023-05-31 14:05   ` Pan Xie
2023-06-01  0:12     ` Samuel Wales
2023-06-01  0:24       ` Pan Xie [this message]
2023-06-01  8:20     ` [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') Ihor Radchenko
2023-06-01  8:24       ` Pan Xie
2023-06-01  8:35         ` Ihor Radchenko
2023-06-01  8:38           ` Pan Xie
2023-06-01  8:52             ` Ihor Radchenko
2023-07-31  8:30       ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=09abec27-155b-e0d8-ed31-ff0e0d450764@skyguard.com.cn \
    --to=xiepan@skyguard.com.cn \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).