[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 089107a 099/399: counsel.el (counsel-ag): Add a keyword ar
From: |
Oleh Krehel |
Subject: |
[elpa] master 089107a 099/399: counsel.el (counsel-ag): Add a keyword argument caller |
Date: |
Sat, 20 Jul 2019 14:56:57 -0400 (EDT) |
branch: master
commit 089107afa12f8450376dcb26c58eadb0be2ecbe9
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-ag): Add a keyword argument caller
---
counsel.el | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/counsel.el b/counsel.el
index 2b477d8..106ca93 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2632,12 +2632,14 @@ NEEDLE is the search string."
nil)))))
;;;###autoload
-(defun counsel-ag (&optional initial-input initial-directory extra-ag-args
ag-prompt)
+(cl-defun counsel-ag (&optional initial-input initial-directory extra-ag-args
ag-prompt
+ &key caller)
"Grep for a string in the current directory using ag.
INITIAL-INPUT can be given as the initial minibuffer input.
INITIAL-DIRECTORY, if non-nil, is used as the root directory for search.
EXTRA-AG-ARGS string, if non-nil, is appended to `counsel-ag-base-command'.
-AG-PROMPT, if non-nil, is passed as `ivy-read' prompt argument."
+AG-PROMPT, if non-nil, is passed as `ivy-read' prompt argument.
+CALLER is passed to `ivy-read'."
(interactive)
(setq counsel-ag-command counsel-ag-base-command)
(setq counsel--regex-look-around counsel--grep-tool-look-around)
@@ -2668,7 +2670,7 @@ AG-PROMPT, if non-nil, is passed as `ivy-read' prompt
argument."
:unwind (lambda ()
(counsel-delete-process)
(swiper--cleanup))
- :caller 'counsel-ag)))
+ :caller (or caller 'counsel-ag))))
(cl-pushnew 'counsel-ag ivy-highlight-grep-commands)
@@ -2715,7 +2717,7 @@ This uses `counsel-ag' with `counsel-pt-base-command'
instead of
(interactive)
(let ((counsel-ag-base-command counsel-pt-base-command)
(counsel--grep-tool-look-around nil))
- (counsel-ag initial-input)))
+ (counsel-ag initial-input :caller 'counsel-pt)))
(cl-pushnew 'counsel-pt ivy-highlight-grep-commands)
;;** `counsel-ack'
@@ -2736,7 +2738,7 @@ This uses `counsel-ag' with `counsel-ack-base-command'
replacing
(interactive)
(let ((counsel-ag-base-command counsel-ack-base-command)
(counsel--grep-tool-look-around t))
- (counsel-ag initial-input)))
+ (counsel-ag initial-input :caller 'counsel-ack)))
;;** `counsel-rg'
@@ -2767,7 +2769,8 @@ Example input with inclusion and exclusion file patterns:
(switch "--pcre2"))
(and (eq 0 (call-process rg nil nil nil switch "--version"))
switch))))
- (counsel-ag initial-input initial-directory extra-rg-args rg-prompt)))
+ (counsel-ag initial-input initial-directory extra-rg-args rg-prompt
+ :caller 'counsel-rg)))
(cl-pushnew 'counsel-rg ivy-highlight-grep-commands)
;;** `counsel-grep'
- [elpa] master b180abf 087/399: counsel.el (counsel-compile): clean-up get-make-targets, (continued)
- [elpa] master b180abf 087/399: counsel.el (counsel-compile): clean-up get-make-targets, Oleh Krehel, 2019/07/20
- [elpa] master 456e575 093/399: Don't bury killed buffers after counsel-switch-buffer, Oleh Krehel, 2019/07/20
- [elpa] master 1c84179 098/399: counsel.el (counsel-rg): Add an example to the doc, Oleh Krehel, 2019/07/20
- [elpa] master b154260 097/399: counsel.el (counsel-grep): Fix TRAMP problems, Oleh Krehel, 2019/07/20
- [elpa] master adab07d 101/399: counsel.el: Simplify counsel-git-grep, Oleh Krehel, 2019/07/20
- [elpa] master 5b4dbbc 096/399: ivy.el: Silence byte-compiler, Oleh Krehel, 2019/07/20
- [elpa] master 3954bfe 081/399: counsel.el (counsel-compile): Don't modify compilation-start-hook permanently, Oleh Krehel, 2019/07/20
- [elpa] master d92d43a 085/399: counsel.el (counsel-compile-root-functions): Tidy, Oleh Krehel, 2019/07/20
- [elpa] master 2356a1d 091/399: ivy-test.el (counsel--grep-regex): Extend test, Oleh Krehel, 2019/07/20
- [elpa] master cdd7ada 094/399: counsel.el (counsel-url-expand): Avoid null error, Oleh Krehel, 2019/07/20
- [elpa] master 089107a 099/399: counsel.el (counsel-ag): Add a keyword argument caller,
Oleh Krehel <=
- [elpa] master 776fbb7 103/399: Make ivy-switch-buffer-occur work with multi-pass regex builders, Oleh Krehel, 2019/07/20
- [elpa] master 8b4c939 100/399: counsel.el (counsel-cd): Add, Oleh Krehel, 2019/07/20
- [elpa] master 0c8cfe8 106/399: ivy-hydra.el (ivy-dispatching-done-idle): Add, Oleh Krehel, 2019/07/20
- [elpa] master 4c52362 110/399: swiper.el (swiper-occur): Make wgrep work for narrowed buffers, Oleh Krehel, 2019/07/20
- [elpa] master 8c1a2fa 107/399: Allow all re-builders to use ivy-highlight-grep-commands, Oleh Krehel, 2019/07/20
- [elpa] master 78b62f2 102/399: README.md: Mention char-fold-to-regexp, Oleh Krehel, 2019/07/20
- [elpa] master a601e40 104/399: counsel.el (counsel-org-goto-all): Use org-mode outline settings, Oleh Krehel, 2019/07/20
- [elpa] master 468e914 109/399: counsel.el (counsel--file-name-filter): Clean up style, Oleh Krehel, 2019/07/20
- [elpa] master 6373a48 105/399: counsel.el: Fix compiler warning, Oleh Krehel, 2019/07/20
- [elpa] master 164fecb 108/399: Make find-file-occur work with multi-pass regex builders, Oleh Krehel, 2019/07/20