[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: |
Rudolf Adamkovič |
Subject: |
Re: Generating the filename from name and file-ext for blocks with side-effects |
Date: |
Fri, 27 Dec 2024 14:56:19 +0100 |
Ihor Radchenko <yantar92@posteo.net> writes:
> [...] and :file-ext is not given? But how will you know the desired
> extension?
Oh, I missed that. My local hack assumes `.svg', but that is not enough
for the general use case.
Perhaps, we could save as `$BASENAME.out', detect the image format, and
then rename to `$BASENAME.svg', for example. If the file is not an
image, we leave it as `.out'.
We can detect the image type with `image-type':
(image-type "...-59b9176e65c9.svg") => svg
If the above is sufficient, the problem reduces to:
how to compute the `$BASENAME'?
[`org-babel-tangle-comment-format-beg' does something similar.]
Rudy
--
"One can begin to reason only when a clear picture has been formed in
the imagination."
--- Walter Warwick Sawyer, Mathematician's Delight, 1943
Rudolf Adamkovič <rudolf@adamkovic.org> [he/him]
http://adamkovic.org
- 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č <=
- 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, 2024/12/31
- Re: Generating the filename from name and file-ext for blocks with side-effects, Ihor Radchenko, 2024/12/26