[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org bdf7afe20e: ob-core: Fix nil value of `org-babel-te
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org bdf7afe20e: ob-core: Fix nil value of `org-babel-temporary-stable-directory' |
Date: |
Thu, 7 Jul 2022 05:57:53 -0400 (EDT) |
branch: externals/org
commit bdf7afe20e9c5049996d111898bd65ef37fb3904
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
ob-core: Fix nil value of `org-babel-temporary-stable-directory'
* lisp/ob-core.el: Make sure that
`org-babel-temporary-stable-directory' is set to non-nil non-existent
directory. Non-existent directory is required to avoid clashes when
multiple Emacs processes are running.
Fixes https://yhetil.org/emacs-devel/87sfnfhm6v.fsf@yandex.com
---
lisp/ob-core.el | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 6c379c121a..75a6a167d0 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -3162,12 +3162,13 @@ Emacs shutdown."))
(or (and (boundp 'org-babel-temporary-stable-directory)
(file-exists-p org-babel-temporary-stable-directory)
org-babel-temporary-stable-directory)
- (condition-case nil
- (make-directory
- (expand-file-name
- "babel-stable"
- (temporary-file-directory)))
- (t nil)))
+ (let (dir)
+ (while (or (not dir) (file-exists-p dir))
+ (setq dir (expand-file-name
+ (format "babel-stable-%d" (random 1000))
+ (temporary-file-directory))))
+ (make-directory dir)
+ dir))
"Directory to hold temporary files created to execute code blocks.
Used by `org-babel-temp-file'. This directory will be removed on
Emacs shutdown."))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/org bdf7afe20e: ob-core: Fix nil value of `org-babel-temporary-stable-directory',
ELPA Syncer <=