Re: Generating the filename from name and file-ext for blocks with side-effects

2025-04-05 Thread Ihor Radchenko
Ihor Radchenko writes: > Rudolf Adamkovič 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 woul

Re: Generating the filename from name and file-ext for blocks with side-effects

2025-03-29 Thread Aitenate
On 25/03/2025 19:31, Ihor Radchenko wrote: > Rudolf Adamkovič writes: > >> Ihor Radchenko writes: >> >>> May I know if you are still interested to work on the patch? >> >> I was hoping someone else (TM) would implement it once we figure out >> what we want. :) That said, I can put it on my to-do

Re: Generating the filename from name and file-ext for blocks with side-effects

2025-03-25 Thread Ihor Radchenko
Rudolf Adamkovič writes: > Ihor Radchenko writes: > >> May I know if you are still interested to work on the patch? > > I was hoping someone else (TM) would implement it once we figure out > what we want. :) That said, I can put it on my to-do list, but it will > be a while, as I am currently *s

Re: Generating the filename from name and file-ext for blocks with side-effects

2025-03-25 Thread Rudolf Adamkovič
Ihor Radchenko writes: > May I know if you are still interested to work on the patch? I was hoping someone else (TM) would implement it once we figure out what we want. :) That said, I can put it on my to-do list, but it will be a while, as I am currently *swamped* with "life". If all goes well

Re: Generating the filename from name and file-ext for blocks with side-effects

2024-12-31 Thread Ihor Radchenko
Rudolf Adamkovič 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. Reas

Re: Generating the filename from name and file-ext for blocks with side-effects

2024-12-30 Thread Rudolf Adamkovič
Ihor Radchenko writes: >> We can detect the image type with `image-type': >> >> (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 f

Re: Generating the filename from name and file-ext for blocks with side-effects

2024-12-27 Thread Ihor Radchenko
Rudolf Adamkovič 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 > the

Re: Generating the filename from name and file-ext for blocks with side-effects

2024-12-27 Thread Rudolf Adamkovič
Ihor Radchenko 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 `$

Re: Generating the filename from name and file-ext for blocks with side-effects

2024-12-26 Thread Ihor Radchenko
Rudolf Adamkovič writes: >> The aim is to not need to define a filename for each image, to minimise >> the boilerplate. > > +1 This should be built into Org and enabled by default. > > I currently generate image names with a custom snippet, but it gets > trying and should not be necessary in the

Re: Generating the filename from name and file-ext for blocks with side-effects

2024-12-26 Thread Ihor Radchenko
Aitenate writes: >>> ~:var outFile=(alist-get :file (nth 2 (org-babel-get-src-block-info >>> 't)))~ >> >> Seems right, but I do not understand why you would need such thing. >> > The aim is to not need to define a filename for each image, to minimise > the boilerplate. Org has a mechanism for

Re: Generating the filename from name and file-ext for blocks with side-effects

2024-12-26 Thread Rudolf Adamkovič
Ihor Radchenko writes: > Seems right, but I do not understand why you would need such thing. Aitenate writes: > The aim is to not need to define a filename for each image, to minimise > the boilerplate. +1 This should be built into Org and enabled by default. I currently generate image na

Re: Generating the filename from name and file-ext for blocks with side-effects

2024-12-25 Thread Aitenate
On 25/12/2024 15:30, Ihor Radchenko wrote: Aitenate writes: With ~:results file~, the absence of ~:file~ will cause the filename to be constructed from the block name and ~:file-ext~, if they are both present. To achieve that with ~:results file link~, I could only come up with ~:var outFile=

Re: Generating the filename from name and file-ext for blocks with side-effects

2024-12-25 Thread Ihor Radchenko
Aitenate writes: > With ~:results file~, the absence of ~:file~ will cause the filename to > be constructed from the block name and ~:file-ext~, if they are both > present. To achieve that with ~:results file link~, I could only come up > with > > ~:var outFile=(alist-get :file (nth 2 (org-babel-

Generating the filename from name and file-ext for blocks with side-effects

2024-12-23 Thread Aitenate
With ~:results file~, the absence of ~:file~ will cause the filename to be constructed from the block name and ~:file-ext~, if they are both present. To achieve that with ~:results file link~, I could only come up with ~:var outFile=(alist-get :file (nth 2 (org-babel-get-src-block-info 't)))~ Ha