diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-15 02:32:04 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-15 02:32:04 -0500 |
| commit | 882cc90716e752e2d6156fe2fe5e320dbbd945d5 (patch) | |
| tree | c7e4c0770a194d488d17387d1407c3b4ada09e63 /tests/test-vterm-toggle--dispatch.el | |
| parent | 19e2e015662309073976a90970dba8512421e149 (diff) | |
| download | dotemacs-882cc90716e752e2d6156fe2fe5e320dbbd945d5.tar.gz dotemacs-882cc90716e752e2d6156fe2fe5e320dbbd945d5.zip | |
refactor(org-roam-config): indirect node-tags accessor for testability
`cj/org-roam-filter-by-tag' called `org-roam-node-tags' directly.
That accessor is generated by `cl-defstruct' and ships with a
compiler-macro that inlines the call to an `aref' against the
`cl-struct-org-roam-node-tags' tag variable at byte-compile time.
In tests, `cl-letf' on `(symbol-function 'org-roam-node-tags)' sets
the function cell but the byte-compiled call site never consults it
-- it executes the inlined `aref' instead. When org-roam isn't
loaded (legitimate for a tag-filter unit test), the inlined code
fails with `void-variable cl-struct-org-roam-node-tags'.
Wrap the accessor in `cj/--org-roam-node-tags' that calls through
`funcall' with a quoted symbol. Quoted symbols skip the
compiler-macro (which only fires on direct call forms), so the
funcall resolves the function cell at runtime and picks up the
test's `cl-letf' stub. Production behavior is unchanged; tests
no longer need org-roam loaded.
Diffstat (limited to 'tests/test-vterm-toggle--dispatch.el')
0 files changed, 0 insertions, 0 deletions
