From 21a767e4cff431111acbc8bddad8db0fc776d227 Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Mon, 13 Dec 2021 10:46:51 -0800 Subject: [PATCH] Make the search results buffer go away. --- ha-config.org | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ha-config.org b/ha-config.org index c298cfc..02489d1 100644 --- a/ha-config.org +++ b/ha-config.org @@ -613,6 +613,7 @@ Ways to search for information goes under the ~s~ key. This primarily depends on :config (ha-leader "s" '(:ignore t :which-key "search") + "s q" '("close" . ha-rg-close-results-buffer) "s r" '("dwim" . rg-dwim) "s s" '("search" . rg) "s S" '("literal" . rg-literal) @@ -623,6 +624,11 @@ Ways to search for information goes under the ~s~ key. This primarily depends on "s k" '("prev results" . ha-rg-go-previous-results) "s b" '("results buffer" . ha-rg-go-results-buffer)) + (defun ha-rg-close-results-buffer () + "Close to the `*rg*' buffer that `rg' creates." + (interactive) + (kill-buffer "*rg*")) + (defun ha-rg-go-results-buffer () "Pop to the `*rg*' buffer that `rg' creates." (interactive)