From 13b053c2a99d30c1131d920a62febde6ee9a628b Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 2 Jun 2026 20:38:06 -0500 Subject: feat(ui): name the operation in completing-read prompts A picker prompt is the last thing shown before a command commits, so a bare noun leaves a mis-keyed command ambiguous. Hitting C-f8 (project agenda) instead of C-f9 (AI-vterm picker) gave the same "Project:" prompt with no signal which one was about to run. Reworded 17 prompts across 8 modules so each names the operation rather than just the thing being chosen: "Project:" becomes "Show agenda for project:", "F6:" becomes "Run tests:", the dwim-shell sub-prompts gain their context (checksum algorithm, PDF compression quality, text-to-speech voice, run dwim-shell command), the two contact pickers split into "Find contact:" and "Insert contact email:", and the dirvish ediff, org finalize, and custom-comments length/box-style prompts get the same treatment. I audited all ~124 completing-read / read-* call sites; the rest already named their operation and were left alone. These are prompt-string changes only, no logic touched. --- modules/dwim-shell-config.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/dwim-shell-config.el') diff --git a/modules/dwim-shell-config.el b/modules/dwim-shell-config.el index 83f1d4a2..57eea706 100644 --- a/modules/dwim-shell-config.el +++ b/modules/dwim-shell-config.el @@ -533,7 +533,7 @@ clipboard contents cannot inject shell commands." (defun cj/dwim-shell-commands-checksum () "Generate checksums for file(s) and save to .checksum file." (interactive) - (let ((algorithm (completing-read "Algorithm: " + (let ((algorithm (completing-read "Checksum algorithm: " '("md5" "sha1" "sha256" "sha512") nil t))) (dwim-shell-command-on-marked-files @@ -656,7 +656,7 @@ all marked files rather than once per file." (defun cj/dwim-shell-commands-compress-pdf () "Compress PDF file size." (interactive) - (let ((quality (completing-read "Quality: " + (let ((quality (completing-read "PDF compression quality: " '("screen" "ebook" "printer" "prepress") nil t "ebook"))) (dwim-shell-command-on-marked-files @@ -677,7 +677,7 @@ all marked files rather than once per file." "Convert text file to speech (audio file)." (interactive) (let ((voice (if (eq system-type 'darwin) - (completing-read "Voice: " '("Alex" "Samantha" "Victoria" "Karen") nil t "Alex") + (completing-read "Text-to-speech voice: " '("Alex" "Samantha" "Victoria" "Karen") nil t "Alex") "en"))) (dwim-shell-command-on-marked-files "Text to speech" @@ -917,7 +917,7 @@ gpg: decryption failed: No pinentry" (symbol-name cmd))) cmd)) commands)) - (selected (completing-read "Command: " + (selected (completing-read "Run dwim-shell command: " command-alist nil t -- cgit v1.2.3