[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Generating the filename from name and file-ext for blocks with side-
From: |
Ihor Radchenko |
Subject: |
Re: Generating the filename from name and file-ext for blocks with side-effects |
Date: |
Tue, 31 Dec 2024 17:50:44 +0000 |
Rudolf Adamkovič <rudolf@adamkovic.org> writes:
>>> (image-type "...-59b9176e65c9.svg") => svg
>>
>> Why do you think that the output file is always an image? It may not
>> be. It can be anything.
>
> I do not think that. I specifically addressed the non-image case: the
> file would retain the `out' extension.
Reasonable.
> But, we could be smart about other file types as well, if we use
> e.g. `file', like `dired-show-file-type' does.
Yes. Although there is another possible problem - current
implementation computes file _before_ the code block is evaluated. In
fact, this thread started from exactly this scenario - get the file name
before it appears on disk. And we have no clue about what will be inside
the file at that point.
--
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- Generating the filename from name and file-ext for blocks with side-effects, Aitenate, 2024/12/23
- Re: Generating the filename from name and file-ext for blocks with side-effects, Ihor Radchenko, 2024/12/25
- Re: Generating the filename from name and file-ext for blocks with side-effects, Aitenate, 2024/12/25
- Re: Generating the filename from name and file-ext for blocks with side-effects, Rudolf Adamkovič, 2024/12/26
- Re: Generating the filename from name and file-ext for blocks with side-effects, Ihor Radchenko, 2024/12/26
- Re: Generating the filename from name and file-ext for blocks with side-effects, Rudolf Adamkovič, 2024/12/27
- Re: Generating the filename from name and file-ext for blocks with side-effects, Ihor Radchenko, 2024/12/27
- Re: Generating the filename from name and file-ext for blocks with side-effects, Rudolf Adamkovič, 2024/12/30
- Re: Generating the filename from name and file-ext for blocks with side-effects,
Ihor Radchenko <=
- Re: Generating the filename from name and file-ext for blocks with side-effects, Ihor Radchenko, 2024/12/26