[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 721db4c 244/348: counsel.el (counsel-grep-post-action-hook
From: |
Oleh Krehel |
Subject: |
[elpa] master 721db4c 244/348: counsel.el (counsel-grep-post-action-hook): New hook for counsel-ag/grep/pt |
Date: |
Sat, 8 Apr 2017 11:04:06 -0400 (EDT) |
branch: master
commit 721db4c5509ee65929e5926d5d2ec16d81a2117d
Author: kimim <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-grep-post-action-hook): New hook for counsel-ag/grep/pt
Fixes #800
---
counsel.el | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/counsel.el b/counsel.el
index 0febe1e..2d7bdc3 100644
--- a/counsel.el
+++ b/counsel.el
@@ -920,6 +920,12 @@ Describe the selected candidate."
(list counsel-git-grep-cmd-default)
"History for `counsel-git-grep' shell commands.")
+(defcustom counsel-grep-post-action-hook nil
+ "Hook that runs after the point moves to the next candidate.
+Typical value: '(recenter)."
+ :type 'hook
+ :group 'ivy)
+
(defun counsel-prompt-function-dir ()
"Return prompt appended with the parent directory."
(ivy-add-prompt-count
@@ -956,6 +962,7 @@ Describe the selected candidate."
(forward-line (1- (string-to-number line-number)))
(re-search-forward (ivy--regex ivy-text t) (line-end-position) t)
(swiper--ensure-visible)
+ (run-hooks 'counsel-grep-post-action-hook)
(unless (eq ivy-exit 'done)
(swiper--cleanup)
(swiper--add-overlays (ivy--regex ivy-text)))))))
@@ -1823,6 +1830,7 @@ the command."
(forward-line (- line-number counsel-grep-last-line))
(setq counsel-grep-last-line line-number))
(re-search-forward (ivy--regex ivy-text t) (line-end-position) t)
+ (run-hooks 'counsel-grep-post-action-hook)
(if (eq ivy-exit 'done)
(swiper--ensure-visible)
(isearch-range-invisible (line-beginning-position)
- [elpa] master 9f5f6e0 202/348: ivy-overlay.el (ivy-overlay-cleanup): Fixup, (continued)
- [elpa] master 9f5f6e0 202/348: ivy-overlay.el (ivy-overlay-cleanup): Fixup, Oleh Krehel, 2017/04/08
- [elpa] master 74d83ab 216/348: Sort virtual buffers after open buffers., Oleh Krehel, 2017/04/08
- [elpa] master 17f8fb3 219/348: ivy.el (ivy-switch-buffer-other-window): Obey ivy-ignore-buffers, Oleh Krehel, 2017/04/08
- [elpa] master 07388d0 226/348: Shrink ivy to suitable height when reading actions., Oleh Krehel, 2017/04/08
- [elpa] master 2237916 223/348: ivy.el (ivy-call): setq default-directory instead of let, Oleh Krehel, 2017/04/08
- [elpa] master 1d97984 227/348: Ensure that ivy--regex-ignore-order always returns legal regexps, Oleh Krehel, 2017/04/08
- [elpa] master 7e02815 235/348: Fix counsel-rg to follow matching candidate, Oleh Krehel, 2017/04/08
- [elpa] master 530b7de 246/348: ivy.el: Use predicate when reading file names, Oleh Krehel, 2017/04/08
- [elpa] master 1c801a0 243/348: Ignore TAGS buffers in swiper-all, Oleh Krehel, 2017/04/08
- [elpa] master 6519ecc 248/348: ivy.el (ivy-call): Don't mess with default-directory, Oleh Krehel, 2017/04/08
- [elpa] master 721db4c 244/348: counsel.el (counsel-grep-post-action-hook): New hook for counsel-ag/grep/pt,
Oleh Krehel <=
- [elpa] master 49acd4c 242/348: Remap scroll-up/down-command instead of assigning C-v/M-v so page up/down works, Oleh Krehel, 2017/04/08
- [elpa] master c322613 240/348: ivy.el (ivy--magic-file-slash): Fix pasting "/etc/", Oleh Krehel, 2017/04/08
- [elpa] master 1304925 239/348: ivy.el (ivy--directory-done): Fix broken "/ssh:", Oleh Krehel, 2017/04/08
- [elpa] master 359a6c8 241/348: Address multiple problems with counsel-rg, Oleh Krehel, 2017/04/08
- [elpa] master 2ed3da4 252/348: counsel.el: Fix byte-compile warning, Oleh Krehel, 2017/04/08
- [elpa] master 09da543 253/348: swiper.el: Ease the creation of swiper-in-region functions, Oleh Krehel, 2017/04/08
- [elpa] master 3940f17 266/348: Fix typos, Oleh Krehel, 2017/04/08
- [elpa] master 25ac29f 079/348: ivy.el (ivy-completion-in-region): Avoid error for 0 candidates, Oleh Krehel, 2017/04/08
- [elpa] master 0572f16 123/348: swiper now respects ivy-re-builders-alist, Oleh Krehel, 2017/04/08
- [elpa] master d528f04 260/348: ivy.el (ivy--virtual-buffers): Don't modify recentfs or bookmarks, Oleh Krehel, 2017/04/08