summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-14 08:30:47 -0500
committerCraig Jennings <c@cjennings.net>2026-05-14 08:30:47 -0500
commitfcdea7f0fcc20b1980ee0ee3fc0ba6159c0cf86e (patch)
tree6e14eda9ed6dd467327ebb741650fd5ae5ee2d01 /tests
parent623f45f2781ed6c489672dcfb09d877657dbe1da (diff)
downloaddotemacs-fcdea7f0fcc20b1980ee0ee3fc0ba6159c0cf86e.tar.gz
dotemacs-fcdea7f0fcc20b1980ee0ee3fc0ba6159c0cf86e.zip
refactor(org-config): flatten table ops directly under the org menu
Drop the `T' sub-prefix so table operations sit directly under `C-; O': `O r i' / `O r d' for rows, `O c i' / `O c d' for columns. Move `cj/org-clear-element-cache' from `c' (which now hosts the table-column sub-prefix) to capital `C'. Single-key org commands under this menu live on capitals from here on so the lowercase letters stay free for table sub-prefixes. Drop `cj/org-table-map' entirely -- its bindings now live directly on `cj/org-map'. Three tests in `test-org-config-keymap-ownership.el' updated/added: `C' for clear-cache, plus row and column binding assertions.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-org-config-keymap-ownership.el22
1 files changed, 20 insertions, 2 deletions
diff --git a/tests/test-org-config-keymap-ownership.el b/tests/test-org-config-keymap-ownership.el
index dd7d314d..7f08a172 100644
--- a/tests/test-org-config-keymap-ownership.el
+++ b/tests/test-org-config-keymap-ownership.el
@@ -23,10 +23,28 @@
cj/org-map)))
(ert-deftest test-org-config-keymap-ownership-normal-clear-cache-on-org-map ()
- "The Org prefix should expose one cache-clear command on c."
- (should (eq (keymap-lookup cj/org-map "c")
+ "The Org prefix should expose the cache-clear command on capital C.
+
+Lowercase `c' is reserved as a sub-prefix for table column operations
+(`c i' insert, `c d' delete); the single-key org commands under this
+menu use capitals to leave the lowercase letters free as table
+sub-prefixes."
+ (should (eq (keymap-lookup cj/org-map "C")
#'cj/org-clear-element-cache)))
+(ert-deftest test-org-config-keymap-ownership-table-row-bindings ()
+ "Table row operations live directly under the org menu at `r i' /
+`r d', no longer behind a `T' sub-prefix."
+ (should (eq (keymap-lookup cj/org-map "r i") #'org-table-insert-row))
+ (should (eq (keymap-lookup cj/org-map "r d") #'org-table-kill-row)))
+
+(ert-deftest test-org-config-keymap-ownership-table-column-bindings ()
+ "Table column operations live directly under the org menu at `c i' /
+`c d', sharing the `c' prefix that used to host the clear-cache
+command (which moved to capital `C')."
+ (should (eq (keymap-lookup cj/org-map "c i") #'org-table-insert-column))
+ (should (eq (keymap-lookup cj/org-map "c d") #'org-table-delete-column)))
+
(ert-deftest test-org-config-keymap-ownership-regression-no-duplicate-org-keymap ()
"The old duplicate `cj/org-keymap' binding should not exist."
(should-not (boundp 'cj/org-keymap)))