emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] [PATCH] Ensure org-babel-temporary-stable-directory bound-and-true [9.6 (9.6-g713598 @ /home/n/.emacs.d/elpaca/builds/org/)]
@ 2022-07-05 23:21 No Wayman
  2022-07-06  0:10 ` No Wayman
  0 siblings, 1 reply; 3+ messages in thread
From: No Wayman @ 2022-07-05 23:21 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 71 bytes --]


Updated today and noticed an error when killing Emacs.
See attached.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-ob-core.el-fix-file-exists-p-error.patch --]
[-- Type: text/x-patch, Size: 1132 bytes --]

From fa822d45559267de6af31f9d34be4266af602d03 Mon Sep 17 00:00:00 2001
From: Nicholas Vollmer <iarchivedmywholelife@gmail.com>
Date: Tue, 5 Jul 2022 19:03:44 -0400
Subject: [PATCH] lisp/ob-core.el: fix file-exists-p error

* ob-core.el (org-babel-remove-temporary-stable-directory):
Ensure org-babel-temporary-stable-directory is non-nil before checking
if it is on disk. Otherwise an error is thrown during kill-emacs-hook.
---
 lisp/ob-core.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 6c379c121..22175a911 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -3264,7 +3264,7 @@ constructed like the following: PREFIXDATAhashSUFFIX."
 
 (defun org-babel-remove-temporary-stable-directory ()
   "Remove `org-babel-temporary-stable-directory' and on Emacs shutdown."
-  (when (and (boundp 'org-babel-temporary-stable-directory)
+  (when (and (bound-and-true-p 'org-babel-temporary-stable-directory)
 	     (file-exists-p org-babel-temporary-stable-directory))
     (let ((org-babel-temporary-directory
            org-babel-temporary-stable-directory))
-- 
2.37.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [BUG] [PATCH] Ensure org-babel-temporary-stable-directory bound-and-true [9.6 (9.6-g713598 @ /home/n/.emacs.d/elpaca/builds/org/)]
  2022-07-05 23:21 [BUG] [PATCH] Ensure org-babel-temporary-stable-directory bound-and-true [9.6 (9.6-g713598 @ /home/n/.emacs.d/elpaca/builds/org/)] No Wayman
@ 2022-07-06  0:10 ` No Wayman
  2022-07-07  9:31   ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: No Wayman @ 2022-07-06  0:10 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 75 bytes --]


Sorry, that symbol should not be quoted in the patch. 
Amended attached.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: take-two --]
[-- Type: text/x-patch, Size: 1129 bytes --]

From 87c400fa8cb3ffa9b4fcf1f958feab4506194a81 Mon Sep 17 00:00:00 2001
From: Nicholas Vollmer <iarchivedmywholelife@gmail.com>
Date: Tue, 5 Jul 2022 19:03:44 -0400
Subject: [PATCH] lisp/ob-core.el: fix file-exists-p error

* ob-core.el (org-babel-remove-temporary-stable-directory):
Ensure org-babel-temporary-stable-directory is non-nil before checking
if it is on disk. Otherwise an error is thrown during kill-emacs-hook.
---
 lisp/ob-core.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 6c379c12..a97c0eba 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -3264,7 +3264,7 @@ constructed like the following: PREFIXDATAhashSUFFIX."
 
 (defun org-babel-remove-temporary-stable-directory ()
   "Remove `org-babel-temporary-stable-directory' and on Emacs shutdown."
-  (when (and (boundp 'org-babel-temporary-stable-directory)
+  (when (and (bound-and-true-p org-babel-temporary-stable-directory)
 	     (file-exists-p org-babel-temporary-stable-directory))
     (let ((org-babel-temporary-directory
            org-babel-temporary-stable-directory))
-- 
2.37.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [BUG] [PATCH] Ensure org-babel-temporary-stable-directory bound-and-true [9.6 (9.6-g713598 @ /home/n/.emacs.d/elpaca/builds/org/)]
  2022-07-06  0:10 ` No Wayman
@ 2022-07-07  9:31   ` Ihor Radchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2022-07-07  9:31 UTC (permalink / raw)
  To: No Wayman; +Cc: emacs-orgmode

No Wayman <iarchivedmywholelife@gmail.com> writes:

> Sorry, that symbol should not be quoted in the patch. 
> Amended attached.

I applied a different fix. See
https://list.orgmode.org/87let71hy0.fsf@yandex.com/T/#t

Best,
Ihor


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-07  9:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05 23:21 [BUG] [PATCH] Ensure org-babel-temporary-stable-directory bound-and-true [9.6 (9.6-g713598 @ /home/n/.emacs.d/elpaca/builds/org/)] No Wayman
2022-07-06  0:10 ` No Wayman
2022-07-07  9:31   ` Ihor Radchenko

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