aboutsummaryrefslogtreecommitdiff
path: root/tests/test-custom-ordering-arrayify.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-10 13:29:11 -0500
committerCraig Jennings <c@cjennings.net>2026-05-10 13:29:11 -0500
commit92299ea3d2f5c982ae62ce6aa1cafb489ee06342 (patch)
tree3b39ae160c1989d48614132598f0886d8fc65e76 /tests/test-custom-ordering-arrayify.el
parent9ead5a6161596cdc29927f5f414b786b76745667 (diff)
downloaddotemacs-92299ea3d2f5c982ae62ce6aa1cafb489ee06342.tar.gz
dotemacs-92299ea3d2f5c982ae62ce6aa1cafb489ee06342.zip
refactor(dirvish): extract cj/--dired-resolve-display-path helper
`cj/dired-copy-path-as-kill' was a 57-line procedural body with the path-resolution branching mixed into the kill-ring write and the user-visible message. Lift the four-way decision (force-absolute / project-relative / home-relative / bare absolute) into `cj/--dired-resolve-display-path', a pure function from (FILE PROJECT-ROOT HOME-DIR FORCE-ABSOLUTE) to (PATH . PATH-TYPE). The wrapper now reads as: get the dired file, ask the helper how to display it, format-or-pass-through, kill-new, message. Seven Normal/Boundary tests cover each branch: project-relative, home-relative, the home-itself "~" glyph, absolute fallback, force-absolute beating both project and home, and project taking precedence over home when both apply.
Diffstat (limited to 'tests/test-custom-ordering-arrayify.el')
0 files changed, 0 insertions, 0 deletions