0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-26 00:02:51 +00:00

* testing/org-test.el: Avoid looking into .emacs.d when ran non-interactively

(org-test-load):
(org-test-update-id-locations): Set `org-id-locations-file' inside
test dir, but only when running in batch mode.

Reported-by: Morgan Smith <Morgan.J.Smith@outlook.com>
Link: https://orgmode.org/list/ub84qp$6pu$1@ciao.gmane.io
This commit is contained in:
Ihor Radchenko 2023-08-13 11:28:32 +03:00
parent 70a082c9fb
commit a0830f94ea
No known key found for this signature in database
GPG key ID: 6470762A7DA11D8B

View file

@ -387,9 +387,8 @@ Tramp related features. We mostly follow
(defun org-test-load () (defun org-test-load ()
"Load up the Org test suite." "Load up the Org test suite."
(interactive) (interactive)
(setq org-id-locations-file (cl-flet
(expand-file-name ".test-org-id-locations" org-test-dir)) ((rld (base)
(cl-flet ((rld (base)
;; Recursively load all files, if files throw errors ;; Recursively load all files, if files throw errors
;; then silently ignore the error and continue to the ;; then silently ignore the error and continue to the
;; next file. This allows files to error out if ;; next file. This allows files to error out if
@ -447,6 +446,8 @@ Tramp related features. We mostly follow
(when (buffer-live-p b) (kill-buffer b))))) (when (buffer-live-p b) (kill-buffer b)))))
(defun org-test-update-id-locations () (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 (org-id-update-id-locations
(directory-files (directory-files
org-test-example-dir 'full org-test-example-dir 'full