diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-10 13:34:24 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-10 13:34:24 -0500 |
| commit | ea2ed6bc4b19ee9b388fda181017969cd17ee3dd (patch) | |
| tree | 2c889ec917e576c8809507523a109917029c8a66 /modules/help-utils.el | |
| parent | aaa093735e77c887a87722ef306b9442973ce314 (diff) | |
| download | dotemacs-ea2ed6bc4b19ee9b388fda181017969cd17ee3dd.tar.gz dotemacs-ea2ed6bc4b19ee9b388fda181017969cd17ee3dd.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 'modules/help-utils.el')
0 files changed, 0 insertions, 0 deletions
