ob-core: Do not use `temporary-file-directory' function

* lisp/ob-core.el (org-babel-temporary-stable-directory): Use
`temporary-file-directory' variable instead of function.  The function
returns value depending on the `default-directory' at Org startup time
thus creating unpredictable temporary babel locations that may
sometimes litter current directory.

Reported-by: bhrgunatha <bhrgunatha@gmail.com>
Link: https://orgmode.org/list/93b040e1-6dc6-487f-de89-a4cea9a560ff@gmail.com
This commit is contained in:
Ihor Radchenko 2023-01-18 12:16:19 +03:00
parent 5d9c9c27c6
commit cbb288eaa5
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 1 deletions

View File

@ -3277,7 +3277,7 @@ Emacs shutdown.")
(while (or (not dir) (file-exists-p dir))
(setq dir (expand-file-name
(format "babel-stable-%d" (random 1000))
(temporary-file-directory))))
temporary-file-directory)))
(make-directory dir)
dir))
"Directory to hold temporary files created to execute code blocks.