Re: [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')

2023-07-31 Thread Ihor Radchenko
Ihor Radchenko writes: > I generally feel that it should be reasonable to go ahead with this > breaking change, possibly disabling variable resolution for ox-org only. Done, on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f409cb4e5 -- Ihor Radchenko // yantar92, Org

Re: [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')

2023-06-01 Thread Ihor Radchenko
Pan Xie writes: > Oh, that path will be horrible! Variable substitution is really > important since it is an abstraction to make the same org file works on > different hosts with different path hierarchies. I believe there are > lots of users already rely on it, even without being documented.

Re: [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')

2023-06-01 Thread Pan Xie
Oh, that path will be horrible! Variable substitution is really important since it is an abstraction to make the same org file works on different hosts with different path hierarchies. I believe there are lots of users already rely on it, even without being documented. The reasonable thinking

Re: [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')

2023-06-01 Thread Ihor Radchenko
Pan Xie writes: > I think we need keep consistent with the file link. Since file link will > substitute the environment variables in its file path, I guess it will > do the same thing when export to html files. It may keep the variables > when export to Org (ox-org). Since both image link and

Re: [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')

2023-06-01 Thread Pan Xie
I think we need keep consistent with the file link. Since file link will substitute the environment variables in its file path, I guess it will do the same thing when export to html files. It may keep the variables when export to Org (ox-org). Since both image link and file link are links,

[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')

2023-06-01 Thread Ihor Radchenko
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

Re: [FR] Please add environment variable substitution in `org-display-inline-images'

2023-05-31 Thread Pan Xie
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

Re: [FR] Please add environment variable substitution in `org-display-inline-images'

2023-05-31 Thread Samuel Wales
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

Re: [FR] Please add environment variable substitution in `org-display-inline-images'

2023-05-31 Thread Pan Xie
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

Re: [FR] Please add environment variable substitution in `org-display-inline-images'

2023-05-31 Thread Ihor Radchenko
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

Re: [FR] Please add environment variable substitution in `org-display-inline-images'

2023-05-28 Thread General discussions about Org-mode.
Pan Xie writes: > So my proposal of the code change would be (find "pxie" in the codes): Thanks for proposing a change. It would be best if you produced a patch file from this :) But someone with a bit more free time could do that as well. This is just FYI, and by no means a big deal, but

[FR] Please add environment variable substitution in `org-display-inline-images'

2023-05-28 Thread Pan Xie
Hello, 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