aboutsummaryrefslogtreecommitdiff
path: root/tests/test-system-utils-eval-buffer.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-10 14:20:45 -0500
committerCraig Jennings <c@cjennings.net>2026-05-10 14:20:45 -0500
commite0f5573d765c0c1697e79be94d8c8198be9f1cbb (patch)
tree727c95c981c2569b10c32cecb0538e7ea367dbc1 /tests/test-system-utils-eval-buffer.el
parent9e8c268fb9be1348882d672b96db1cd1872f4711 (diff)
downloaddotemacs-e0f5573d765c0c1697e79be94d8c8198be9f1cbb.tar.gz
dotemacs-e0f5573d765c0c1697e79be94d8c8198be9f1cbb.zip
refactor(system-lib): extract cj/file-from-context from system-utils
Phase 2.4 of utility-consolidation, the last item in the spec's recommended order. `cj/--file-from-context' resolves "the current file" via a three-step fallback chain (explicit arg, `buffer-file-name', dired file at point) -- a useful pattern for any command that operates on the current file regardless of which kind of buffer the user is in. Promote to public `cj/file-from-context' and re-home in system-lib.el so other modules (mail capture, external-open, AI conversation, dirvish helpers) can use it without an awkward dependency on system-utils. Migrate the two callers in system-utils.el (`cj/open-this-file-with' and `cj/open-file-with-command') and add `(require \='system-lib)' there per the Phase 2 exit criterion. Move the existing 7-test file to `tests/test-system-lib-file-from-context.el' and update its references to the new public name. The test shape is unchanged: 4 Normal + 3 Boundary cases covering explicit-arg precedence, buffer-file-name fallback, dired fallback, and the all-nil case.
Diffstat (limited to 'tests/test-system-utils-eval-buffer.el')
0 files changed, 0 insertions, 0 deletions