From c7ed93b3ae239dfcbd4153c08b9af0532f885c77 Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Fri, 25 Aug 2023 08:40:00 -0700 Subject: [PATCH] Fix two bugs First, my eshell command on a file now works ... because it is now interactive. Sheesh. And the `,` key works more reliably as a major mode key hierarchy. --- ha-config.org | 4 +++- ha-eshell.org | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ha-config.org b/ha-config.org index 11a1a4d..3ca51cf 100644 --- a/ha-config.org +++ b/ha-config.org @@ -552,7 +552,9 @@ I'm not trying an experiment where specially-placed function keys on my fancy er :states '(normal visual motion) :prefix "," :global-prefix "" - :non-normal-prefix "S-SPC")) + :non-normal-prefix "S-SPC") + + (general-nmap "SPC m" (general-simulate-key "," :which-key "major mode"))) #+end_src *** Relabel the G Keys Can’t remember all the shortcuts on the ~g~ key, and =which-key= displays the entire function, so let’s /re-add/ those keybindings, but with labels. The ~g~ is extemely convenient, yet I realize that I will never use some of the default keybindings (like ~g m~ to go to the middle of the line? Too imprecise). So I am also going to delete some of them. diff --git a/ha-eshell.org b/ha-eshell.org index 26f7693..86aa523 100644 --- a/ha-eshell.org +++ b/ha-eshell.org @@ -1516,7 +1516,7 @@ Sometimes you need to change something about the current file you are editing... Will rename the current file to now have a .txt extension. See `eshell-display-modifier-help' for details on that." - + (interactive "sExecute command on File Buffer: ") (let* ((file-name (buffer-file-name)) (full-cmd (cond ((string-match (rx "$$") cmd) (replace-regexp-in-string (rx "$$") file-name cmd))