From b34909973bcf9f0fed940cab5e3192e54708ad7f Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 28 May 2026 01:11:22 -0500 Subject: feat(saved): add pearl-delete-saved-query and a sentinel cancel for run `pearl-saved-queries' was write-only from a user's perspective. Save was bound to the builder, run was bound to a key, but removing a stale entry meant `M-x customize-variable RET pearl-saved-queries RET` and a manual delete from the Customize buffer. `pearl-delete-saved-query` under `C-; L k q` (and `q` in the transient's Delete group) closes that gap: completes over the saved query names with `[ None. ]` at the top as a cancel, confirms, removes the entry, and persists via `customize-save-variable`. Linear is untouched. Saved queries are local. Pushing them up to Linear as custom views is a separate spec. While in the same path, `pearl-run-saved-query` got the same sentinel cancel. Both prompts use the keep-order completion table so `[ None. ]` stays at the top regardless of the user's completion sorter. Both error cleanly when `pearl-saved-queries` is empty rather than offering an empty picker. Six tests cover the new command (delete-on-yes, no-at-confirm, sentinel-cancels, unknown-name-errors, empty-list-errors) plus run's sentinel cancel. --- tests/test-pearl-keymap.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/test-pearl-keymap.el') diff --git a/tests/test-pearl-keymap.el b/tests/test-pearl-keymap.el index 5cc658d..d04e309 100644 --- a/tests/test-pearl-keymap.el +++ b/tests/test-pearl-keymap.el @@ -89,7 +89,8 @@ The lowercase `c' is no longer a direct command -- it is the create prefix." (should (eq 'pearl-create-issue (lookup-key pearl-prefix-map (kbd "c t")))) (should (eq 'pearl-create-comment (lookup-key pearl-prefix-map (kbd "c c")))) (should (eq 'pearl-delete-current-issue (lookup-key pearl-prefix-map (kbd "k t")))) - (should (eq 'pearl-delete-current-comment (lookup-key pearl-prefix-map (kbd "k c"))))) + (should (eq 'pearl-delete-current-comment (lookup-key pearl-prefix-map (kbd "k c")))) + (should (eq 'pearl-delete-saved-query (lookup-key pearl-prefix-map (kbd "k q"))))) (ert-deftest test-pearl-prefix-map-open-and-copy-groups () "The open group resolves the two open actions; copy resolves copy-url." -- cgit v1.2.3