Ferdinand Pieper <f...@pie.tf> writes:

>> Have you seen org-babel-temp-stable-file?
> I have not. Seems really useful, thanks for mentioning. I wrote my functions 
> before org-babel-temp-stable-file was added, but seems I can simplify them 
> now quite a bit.
> I noticed two possible bugs in org-babel-temp-stable-file:
> 1. Prefix could be an empty string and that would break the filename 
> extension, because (expand-file-name "" org-babel-temporary-stable-directory) 
> would not add a slash in the path.

Fixed now.

> 2. The org-babel-temporary-stable-directory is only created upon initial 
> loading. But the intended behavior for remote paths seems to be to create the 
> temp files on the remote. Which will fail, because 
> org-babel-temporary-stable-directory does not exist on the remote. However 
> creating the directories on remotes of course makes cleanup harder to 
> impossible, if the remotes are not accessible any more.

For remotes, we fall back to org-babel-remote-temporary-directory.
Apparently in all but one place in code. Now fixed.

> It could also be nice to add an extra argument to force the use of the local 
> org-babel-temporary-stable-directory for remote files.

I am not sure if it is a good idea.
On remote files, default-directory often points to the remote making
`shell-command' and similar run code on remote machine. It may not work
well with local temporary directory.

Ihor Radchenko // yantar92,
Org mode contributor,
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