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