Rudolf Adamkovič <rud...@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>

Reply via email to