Skip to content

test-ob-hy.el changes the global value of org-id-locations-file #6

@TinaRussell

Description

@TinaRussell

In test-ob-hy.el:

(defconst org-id-locations-file
  (expand-file-name ".test-org-id-locations" ob-hy-test-dir))

It may be there for testing purposes, but it seems to be persistent—I have (use-package ob-hy) in my init file (and I have the package installed via MELPA), and Customize reports that org-id-locations-file has changed outside Customize to ~/.emacs.d/elpa/ob-hy-1.0.1/.test-org-id-locations (the original value was ~/.emacs.d/.org-id-locations). This must throw a monkey wrench into org-id tracking!

My best guess as to how to fix this: instead of the defconst, ensure that every time a function being called needs the test value of org-id-locations-file, it’s wrapped in a let-block:

(let ((org-id-locations-file (expand-file-name ".test-org-id-locations" ob-hy-test-dir)))
  …(STUFF-GOES-HERE)…)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions