From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iEBgDjYxVmO/BgAAbAwnHQ (envelope-from ) for ; Mon, 24 Oct 2022 08:31:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id QP2HDTYxVmPqagEAG6o9tA (envelope-from ) for ; Mon, 24 Oct 2022 08:31:18 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E20BC2C4C2 for ; Mon, 24 Oct 2022 08:31:17 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omkNA-0001l9-D4 for larch@yhetil.org; Sun, 23 Oct 2022 19:27:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omSAh-00048G-CC for emacs-orgmode@gnu.org; Sun, 23 Oct 2022 00:01:16 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omSAe-0000FA-6v for emacs-orgmode@gnu.org; Sun, 23 Oct 2022 00:01:10 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id C2837240101 for ; Sun, 23 Oct 2022 06:01:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666497663; bh=RnNWsfYfUmMUqMwuq2mVKPW6E3ywnAeS6fMV+8sgF8w=; h=From:To:Cc:Subject:Date:From; b=aWkVmsRyM8ZorlL8xh2RXev5Qx/eK95AQWXmDMIHM4J/U2apdG2TW7YNjsT7EjEVu LQf6uU61T2vJ6ffy6G6he6LFSq0jvEVtEOHMPpdso9D3JW7qCb/CaN/+UBr3gihD/E CxSmrgpv8Jbcg0KJ11wpqtPgPHWL9h4EocgZftmEphfA+kCwWrxxKlKvOkfw3vBSNj Zfu97Gn22Z0GNiWOsevsaTVuQkBbUErFeadogVlVfMBLkNUtTAXhnRoBKa31IxMP7j atcWm+gxUGgwJIYU+ucHhYpJkwLwHQxoBI96y37LOGD0uGcZJNsPvCmrqVNBhhxmcT HSuHdxO8wuvPA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mw4Hv4NnVz9rxG; Sun, 23 Oct 2022 06:00:59 +0200 (CEST) From: Ihor Radchenko To: Ferdinand Pieper Cc: emacs-orgmode@gnu.org Subject: Re: Possible bugs in org-babel-temp-stable-file (was: [PATCH] Add light argument to org-babel-lob-get-info) In-Reply-To: <87r0yz7u9q.fsf_-_@pie.tf> References: <877d109d3k.fsf@ims.uni-hannover.de> <87bkqaizns.fsf@localhost> <87wn8xds64.fsf@ims.uni-hannover.de> <874jw0cn5c.fsf@localhost> <87r0yz7u9q.fsf_-_@pie.tf> Date: Sun, 23 Oct 2022 04:01:43 +0000 Message-ID: <87ilkbqjbs.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666593077; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=7dJTDUwnBWfF5EYimiho9C8Fj0M3OcBdFZUS1aDIoHI=; b=t1VidPiCYyZ5bSQsDi0zps3QXXThSe/2dXzN5y3CwWTOB1ILFXEgmdl+TMY9qoIWOyIVve ABI08upWeu3dtIoOBTk72Eiy+V/XaErHQjUVSfrNNAMZjB0vk5MiuNNE14alDyxUZDBGiQ QYpVYfk1ZRIz41Ls2CpjUIx4FQWCT20fj5w3IVu5ApTrsGKn5Ok/zfIyoKvhI8Nt9K7vr0 UwJnHXBf/IcA5E6AiasLGOO4grnOUeRezgeGlccmglftd0eHNB3hNBU1KeBf3QMKsMcKMQ ocu0mWvo2haodaDHCgGUlVVmeZ94LweqvE/TrZnOGQfSJP2TQJekdquBGIKjOQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666593077; a=rsa-sha256; cv=none; b=cczzzq0arzoNExEkZQ3hEkqejsjksTf4UqawCtDyJ3p2Cs7zO8kwN3ZP6cSHqHCSoew/T/ D6YnUflUbh/iTqlAGQ8ZTesuyLzMIKB5SxV9Ml32wpsmj258WpKr0YWURK5Q8DZLCk6pWT BCtTN3YAfbhtwN+XPoHnNSkUcDygxbk0KcWSx2DUqnVJ/jfnn/dyIsJzAZdsR4q1Xns6na 03LkmUhTgdIjFpFUD7Apw6I3cM+IqxQgTeKqH41C1rMfSLri6I0VfWN3itN9cTQO5+Ytqs 9PvXFDy/Aaq5Ga5o+HBycLcf+nBTanHzUAAj4Od3Ej7w0xdthBETYQOsYQoC6w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=aWkVmsRy; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -0.90 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=aWkVmsRy; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E20BC2C4C2 X-Spam-Score: -0.90 X-Migadu-Scanner: scn1.migadu.com X-TUID: rx/lIDAySLMo Ferdinand Pieper 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. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=69e3a4db3d0c54b4165761f56523da4962eff74c > 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 . Support Org development at , or support my work at