[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 3f4f080 226/272: counsel-ag now works with ivy-occur-rever
From: |
Oleh Krehel |
Subject: |
[elpa] master 3f4f080 226/272: counsel-ag now works with ivy-occur-revert-buffer |
Date: |
Mon, 25 Apr 2016 10:13:27 +0000 |
branch: master
commit 3f4f0809de70703fc3706c541d3fc27c5fc49a11
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel-ag now works with ivy-occur-revert-buffer
* ivy.el (ivy-occur-revert-buffer): Add `counsel-ag' to the list.
* counsel.el (counsel-ag-occur): Don't call `ivy-occur-grep-mode' unless
needed.
> (string-match "\"\\(.*\\)\"" (buffer-name))
Is a hack to recover the old `ivy-text', since it's not a field in
`ivy-last', and may have changed in the meantime.
TODO: Fix this sort of hacks, all necessary session data should really be
in `ivy-last'.
---
counsel.el | 7 +++++--
ivy.el | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/counsel.el b/counsel.el
index cce85dc..5472969 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1337,11 +1337,14 @@ INITIAL-INPUT can be given as the initial minibuffer
input."
(defun counsel-ag-occur ()
"Generate a custom occur buffer for `counsel-ag'."
- (ivy-occur-grep-mode)
+ (unless (eq major-mode 'ivy-occur-grep-mode)
+ (ivy-occur-grep-mode))
(setq default-directory counsel--git-grep-dir)
(let* ((regex (counsel-unquote-regex-parens
(setq ivy--old-re
- (ivy--regex ivy-text))))
+ (ivy--regex
+ (progn (string-match "\"\\(.*\\)\"" (buffer-name))
+ (match-string 1 (buffer-name)))))))
(cands (split-string
(shell-command-to-string
(format counsel-ag-base-command (shell-quote-argument
regex)))
diff --git a/ivy.el b/ivy.el
index 5b23a4e..8d25e28 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2853,7 +2853,7 @@ updated original buffer."
(let ((inhibit-read-only t))
(erase-buffer)
(funcall (plist-get ivy--occurs-list caller) t))))
- ((memq caller '(counsel-git-grep counsel-grep))
+ ((memq caller '(counsel-git-grep counsel-grep counsel-ag))
(let ((inhibit-read-only t))
(erase-buffer)
(funcall (plist-get ivy--occurs-list caller)))))))
- [elpa] master e8f516e 182/272: counsel.el (counsel-ag): Add transformer, (continued)
- [elpa] master e8f516e 182/272: counsel.el (counsel-ag): Add transformer, Oleh Krehel, 2016/04/25
- [elpa] master 6a8da39 206/272: counsel.el (counsel-grep-action): Reveal outlines, Oleh Krehel, 2016/04/25
- [elpa] master 2bd092d 222/272: ivy.el (ivy--minibuffer-setup): Ensure inhibit-field-text-motion is nil, Oleh Krehel, 2016/04/25
- [elpa] master 2ac1d2d 256/272: ivy.el (ivy-occur-press): Set counsel-grep-last-line to nil, Oleh Krehel, 2016/04/25
- [elpa] master 4ebf0b4 215/272: ivy.el: Add `counsel-find-file' transformer., Oleh Krehel, 2016/04/25
- [elpa] master 615dd90 241/272: counsel.el (counsel-grep-action): Work better from ivy-occur, Oleh Krehel, 2016/04/25
- [elpa] master 1485e58 076/272: Add ignore pattern toggling, Oleh Krehel, 2016/04/25
- [elpa] master 8dfff3e 200/272: ivy.el (ivy-next-history-element): Improve, Oleh Krehel, 2016/04/25
- [elpa] master 3177419 216/272: ivy.el (ivy-sort-functions-alist): Update :type, Oleh Krehel, 2016/04/25
- [elpa] master abf880f 214/272: ivy.el (ivy-read): Make "M-o" not modify the action, Oleh Krehel, 2016/04/25
- [elpa] master 3f4f080 226/272: counsel-ag now works with ivy-occur-revert-buffer,
Oleh Krehel <=
- [elpa] master f31ab12 066/272: swiper.el (swiper--ivy): Return point, Oleh Krehel, 2016/04/25
- [elpa] master 6777cf8 220/272: counsel.el (counsel-unquote-regex-parens): Improve, Oleh Krehel, 2016/04/25
- [elpa] master ddc1d9f 114/272: Move all faces to ivy-faces group, Oleh Krehel, 2016/04/25
- [elpa] master e92d282 195/272: Make ivy-ignore-buffers similar to ido-ignore-buffers., Oleh Krehel, 2016/04/25
- [elpa] master 4235ffc 092/272: colir.el (colir-blend-face-background): Improve, Oleh Krehel, 2016/04/25
- [elpa] master 9aee83a 105/272: ivy.el (ivy-completion-in-region): Bind completion-ignore-case, Oleh Krehel, 2016/04/25
- [elpa] master 2a1ef54 148/272: ivy-dispatching-done should not permanently modify default action index, Oleh Krehel, 2016/04/25
- [elpa] master 5eaf787 078/272: doc/ivy.org: Improve the Texinfo/HTML export structure, Oleh Krehel, 2016/04/25
- [elpa] master b7c40d3 152/272: ivy.el (ivy-resume): Add a guard against null :action, Oleh Krehel, 2016/04/25
- [elpa] master 2ab9c54 197/272: ivy.el (ivy--switch-buffer-matcher): Fix, Oleh Krehel, 2016/04/25