emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ferdinand Pieper <fer@pie.tf>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Possible bugs in org-babel-temp-stable-file (was: [PATCH] Add light argument to org-babel-lob-get-info)
Date: Sat, 22 Oct 2022 17:28:01 +0200	[thread overview]
Message-ID: <87r0yz7u9q.fsf_-_@pie.tf> (raw)
In-Reply-To: <874jw0cn5c.fsf@localhost> (Ihor Radchenko's message of "Wed, 19 Oct 2022 07:01:35 +0000")

Ihor Radchenko <yantar92@posteo.net> writes:

> Applied onto main.

Thanks

> 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.

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.

I can try to write a patch for both, but I do not fully understand the org-babel-temp-stable-file code. It seems with the use of with-temp-file there is no need to change temporary-file-directory anymore?

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.


Best,


  reply	other threads:[~2022-10-24  6:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-16 12:17 [PATCH] Add light argument to org-babel-lob-get-info Ferdinand Pieper
2022-10-17  9:10 ` Ihor Radchenko
2022-10-18 16:15   ` Ferdinand Pieper
2022-10-19  7:01     ` Ihor Radchenko
2022-10-22 15:28       ` Ferdinand Pieper [this message]
2022-10-23  4:01         ` Possible bugs in org-babel-temp-stable-file (was: [PATCH] Add light argument to org-babel-lob-get-info) Ihor Radchenko
2022-10-23 11:27           ` Possible bugs in org-babel-temp-stable-file Ferdinand Pieper
2022-10-24  4:12             ` Ihor Radchenko
2022-10-24  7:49               ` Ferdinand Pieper
2022-10-24  8:24                 ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r0yz7u9q.fsf_-_@pie.tf \
    --to=fer@pie.tf \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).