aboutsummaryrefslogtreecommitdiff
path: root/custom
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-10 13:34:24 -0500
committerCraig Jennings <c@cjennings.net>2026-05-10 13:34:24 -0500
commit7fd96c80de602b7ddfbc72f67fbd65f80df4bd9e (patch)
treeb26b0ad3bfa5813b155bddb13d906b94038911cc /custom
parent889f68d2931714f42000cc8c8c329757d3fc2c38 (diff)
downloaddotemacs-7fd96c80de602b7ddfbc72f67fbd65f80df4bd9e.tar.gz
dotemacs-7fd96c80de602b7ddfbc72f67fbd65f80df4bd9e.zip
refactor(dirvish): extract playlist filter and sanitize helpers
`cj/dired-create-playlist-from-marked' had its audio-file filtering and trailing-`.m3u' stripping inline among the dired marking, prompting, overwrite-loop, and file-write logic. Lift each into its own pure helper: - `cj/--playlist-filter-audio (files extensions)' returns only files whose extension matches one of EXTENSIONS (lowercase, no dot). Case-insensitive on the file side. - `cj/--playlist-sanitize-name (name)' strips a trailing `.m3u' suffix; embedded `.m3u' that isn't at the end is preserved. Ten Normal/Boundary tests cover keep-only-audio, case-insensitivity, files-without-extension excluded, empty inputs, and the sanitize edge cases (bare name, embedded `.m3u', empty string, just `.m3u').
Diffstat (limited to 'custom')
0 files changed, 0 insertions, 0 deletions