From 9564501efe2488b9136dc19a7a8d385b8b074b46 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 6 Jun 2026 15:37:22 -0500 Subject: feat(keys): bind sort and grouping under the views prefix The interactive view-shaping commands shipped M-x-only. I bound them in the views sub-map so they're reachable from the keyboard: C-; L v s sorts, C-; L v g groups, C-; L v r reverses the sort order, with matching which-key labels. They sit in the views group because there's no dedicated view-shaping group. Opening one means reopening the whole keymap-prefix question that's already parked. So they reshape the active buffer from under a "views" prefix that otherwise manages saved views, a slight category stretch called out in the map's docstring. The transient menu still omits both, pending the same keymap-shape pass. --- tests/test-pearl-keymap.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/test-pearl-keymap.el') diff --git a/tests/test-pearl-keymap.el b/tests/test-pearl-keymap.el index 49dbd31..6107d9f 100644 --- a/tests/test-pearl-keymap.el +++ b/tests/test-pearl-keymap.el @@ -221,5 +221,17 @@ literal my-open-issues fetch stays at f o (they are no longer the same command). (pearl--maybe-enable-mode) (should-not pearl-mode))) +(ert-deftest test-pearl-views-map-shaping-bindings () + "The views sub-map binds the view-shaping commands: sort, group, reverse order." + (should (eq 'pearl-set-sort (lookup-key pearl-views-map (kbd "s")))) + (should (eq 'pearl-set-grouping (lookup-key pearl-views-map (kbd "g")))) + (should (eq 'pearl-toggle-sort-order (lookup-key pearl-views-map (kbd "r")))) + (should (string= "sort view" + (test-pearl-keymap--label-of pearl-views-map 'pearl-set-sort))) + (should (string= "group view" + (test-pearl-keymap--label-of pearl-views-map 'pearl-set-grouping))) + (should (string= "reverse order" + (test-pearl-keymap--label-of pearl-views-map 'pearl-toggle-sort-order)))) + (provide 'test-pearl-keymap) ;;; test-pearl-keymap.el ends here -- cgit v1.2.3