emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Testing: Ensure 'org-id-locations-file' is set before updating


From: Morgan Smith
Subject: [PATCH] Testing: Ensure 'org-id-locations-file' is set before updating
Date: Tue, 18 Jul 2023 12:40:16 -0400

Previously, when trying to run the tests in a container limited to the
org repository, it fails because it can't create the directory
"~/.emacs.d/.org-id-locations".

* testing/org-test.el (org-test-load): Move setting
'org-id-locations-file' from here ...
org-test-update-id-locations: ... to here
---

Hello!  This fix allows me to run the tests without giving it access to the
filesystem outside of the repository.  I have no clue what org-id-locations are
and I'm hoping someone else does so I don't have to learn.  I'm not sure if
this is the best fix, but it works.

 testing/org-test.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testing/org-test.el b/testing/org-test.el
index 47687b9f7..3f086f30c 100644
--- a/testing/org-test.el
+++ b/testing/org-test.el
@@ -387,8 +387,6 @@ Tramp related features.  We mostly follow
 (defun org-test-load ()
   "Load up the Org test suite."
   (interactive)
-  (setq org-id-locations-file
-        (expand-file-name ".test-org-id-locations" org-test-dir))
   (cl-flet ((rld (base)
                 ;; Recursively load all files, if files throw errors
                 ;; then silently ignore the error and continue to the
@@ -447,6 +445,8 @@ Tramp related features.  We mostly follow
       (when (buffer-live-p b) (kill-buffer b)))))
 
 (defun org-test-update-id-locations ()
+  (setq org-id-locations-file
+        (expand-file-name ".test-org-id-locations" org-test-dir))
   (org-id-update-id-locations
    (directory-files
     org-test-example-dir 'full
-- 
2.41.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]