From 8a832b2cd83ce60c72e6408ce5d3758fe73871e5 Mon Sep 17 00:00:00 2001 From: Justin Giancola Date: Wed, 11 Apr 2012 16:42:08 -0400 Subject: [PATCH 1/2] don't leave the results window open when there aren't any matches note: "Ack finished with 0 matches" will still show in the minibuffer --- full-ack.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/full-ack.el b/full-ack.el index 5a7b0f7..2994407 100644 --- a/full-ack.el +++ b/full-ack.el @@ -333,7 +333,7 @@ This can be used in `ack-root-directory-functions'." (if (> c 0) (when (eq ack-display-buffer 'after) (display-buffer (current-buffer))) - (kill-buffer (current-buffer))) + (kill-buffer-and-window)) (message "Ack finished with %d match%s" c (if (eq c 1) "" "es")))))) (defun ack-filter (proc output) From c92e797304cec6448c782165dea7d677f0dfaab7 Mon Sep 17 00:00:00 2001 From: Justin Giancola Date: Wed, 11 Apr 2012 16:47:03 -0400 Subject: [PATCH 2/2] close results window after browsing to result with ack-find-match --- full-ack.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/full-ack.el b/full-ack.el index 2994407..c3f3a34 100644 --- a/full-ack.el +++ b/full-ack.el @@ -699,7 +699,8 @@ DIRECTORY is the root directory. If called interactively, it is determined by (marker-buffer marker)) (compilation-goto-locus msg marker end) (set-marker msg nil) - (set-marker end nil)))) + (set-marker end nil) + (delete-other-windows)))) ;;; ack-mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;