From 0bb5e68cf3edfbb9389318246a3af99645ceabce Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Wed, 8 Jul 2026 11:46:21 -0500 Subject: feat(music): move radio to a C-; m r prefix, lowercase the menu keys The two radio search commands were reachable only as n/t inside the playlist buffer, and R jumped straight into the manual name+URL entry. r is now a radio prefix with the same letters the playlist's Radio row uses: n searches by name, t by tag, m is the manual entry. The rest of the menu's uppercase keys moved to lowercase homes: v shows the playlist (was M), u shuffles (was Z), and repeat-playlist moved from r to l to free the radio prefix. In the playlist buffer, save moved from w to v. --- tests/test-music-config-create-radio-station.el | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tests') diff --git a/tests/test-music-config-create-radio-station.el b/tests/test-music-config-create-radio-station.el index 21241965..7d9adbed 100644 --- a/tests/test-music-config-create-radio-station.el +++ b/tests/test-music-config-create-radio-station.el @@ -94,6 +94,28 @@ 'info-title) "Café Del Mar ☕")))) +;;; Keymap + +(ert-deftest test-music-config-radio-map-prefix-mirrors-playlist-keys () + "Normal: C-; m r is a radio prefix whose n/t/m mirror the playlist buffer." + (let ((map (lookup-key cj/music-map "r"))) + (should (keymapp map)) + (should (eq (lookup-key map "n") 'cj/music-radio-search-by-name)) + (should (eq (lookup-key map "t") 'cj/music-radio-search-by-tag)) + (should (eq (lookup-key map "m") 'cj/music-create-radio-station)))) + +(ert-deftest test-music-config-menu-map-lowercase-keys () + "Normal: the menu's former uppercase keys live on lowercase homes, and the +playlist buffer saves on v." + (should (eq (lookup-key cj/music-map "v") 'cj/music-playlist-show)) + (should (eq (lookup-key cj/music-map "u") 'emms-shuffle)) + (should (eq (lookup-key cj/music-map "l") 'emms-toggle-repeat-playlist)) + (should-not (lookup-key cj/music-map "R")) + (should-not (lookup-key cj/music-map "M")) + (should-not (lookup-key cj/music-map "Z")) + (should (eq (lookup-key emms-playlist-mode-map "v") 'cj/music-playlist-save)) + (should-not (eq (lookup-key emms-playlist-mode-map "w") 'cj/music-playlist-save))) + ;;; Error Cases (ert-deftest test-music-config-create-radio-station-error-empty-name-signals-user-error () -- cgit v1.2.3