[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 0703a70 380/399: counsel.el (counsel-async-ignore-re-alist
From: |
Oleh Krehel |
Subject: |
[elpa] master 0703a70 380/399: counsel.el (counsel-async-ignore-re-alist): Extract |
Date: |
Sat, 20 Jul 2019 14:58:03 -0400 (EDT) |
branch: master
commit 0703a709186c37a8483d3c3ae736472dda3fc975
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-async-ignore-re-alist): Extract
* counsel.el (counsel-async-ignore-re): Obsolete.
Re #2133
---
counsel.el | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/counsel.el b/counsel.el
index 0d59890..03c8703 100644
--- a/counsel.el
+++ b/counsel.el
@@ -180,6 +180,10 @@ descriptions.")
(defvar counsel-async-ignore-re nil
"Regexp matching candidates to ignore in `counsel--async-filter'.")
+(make-obsolete-variable 'counsel-async-ignore-re
'counsel-async-ignore-re-alist "<2019-07-16 Tue>")
+
+(defvar counsel-async-ignore-re-alist nil
+ "An alist of regexp matching candidates to ignore in
`counsel--async-filter'.")
(defun counsel--async-command (cmd &optional sentinel filter name)
"Start and return new counsel process by calling CMD.
@@ -264,10 +268,11 @@ Update the minibuffer with the amount of lines collected
every
(with-current-buffer (process-buffer process)
(setq numlines (count-lines (point-min) (point-max)))
(ivy--set-candidates
- (let ((lines (counsel--split-string)))
- (if (stringp counsel-async-ignore-re)
+ (let ((lines (counsel--split-string))
+ (ignore-re (ivy-alist-setting counsel-async-ignore-re-alist)))
+ (if (stringp ignore-re)
(cl-remove-if (lambda (line)
- (string-match-p counsel-async-ignore-re line))
+ (string-match-p ignore-re line))
lines)
lines))))
(let ((ivy--prompt (format "%d++ %s" numlines (ivy-state-prompt
ivy-last))))
@@ -1706,8 +1711,7 @@ currently checked out."
(defun counsel-git-log ()
"Call the \"git log --grep\" shell command."
(interactive)
- (let ((counsel-async-ignore-re "^[ \n]*$")
- (counsel-yank-pop-truncate-radius 5))
+ (let ((counsel-yank-pop-truncate-radius 5))
(ivy-read "Grep log: " #'counsel-git-log-function
:dynamic-collection t
:action #'counsel-git-log-action
@@ -1717,6 +1721,7 @@ currently checked out."
(add-to-list 'ivy-format-functions-alist '(counsel-git-log .
counsel--yank-pop-format-function))
(add-to-list 'ivy-height-alist '(counsel-git-log . 4))
(add-to-list 'counsel-async-split-string-re-alist '(counsel-git-log . "^commit
"))
+(add-to-list 'counsel-async-ignore-re-alist '(counsel-git-log . "^[ \n]*$"))
;;* File
;;** `counsel-find-file'
- [elpa] master 72a827a 373/399: counsel.el (counsel-git-log): Add additional action., (continued)
- [elpa] master 72a827a 373/399: counsel.el (counsel-git-log): Add additional action., Oleh Krehel, 2019/07/20
- [elpa] master 259cf07 374/399: Fix ivy-previous-line-or-history, Oleh Krehel, 2019/07/20
- [elpa] master d91f61d 378/399: counsel.el (counsel--split-string): Extract, Oleh Krehel, 2019/07/20
- [elpa] master e858b10 371/399: Add autoload for various commands, Oleh Krehel, 2019/07/20
- [elpa] master 75f4146 377/399: ivy.el (ivy-occur-revert-buffer): Stay on the same line, Oleh Krehel, 2019/07/20
- [elpa] master 3ec81dc 369/399: ivy-test.el (swiper--re-builder-char-fold): Split away, Oleh Krehel, 2019/07/20
- [elpa] master 98127be 375/399: ivy.el (ivy-format-functions-alist): Fix defcustom type, Oleh Krehel, 2019/07/20
- [elpa] master 1bb48ae 376/399: swiper.el: Add :group for faces, Oleh Krehel, 2019/07/20
- [elpa] master 3380b6f 382/399: swiper.el (swiper--avy-goto): Works for swiper-isearch, Oleh Krehel, 2019/07/20
- [elpa] master bd53ada 379/399: counsel.el (counsel-async-split-string-re-alist): Extract, Oleh Krehel, 2019/07/20
- [elpa] master 0703a70 380/399: counsel.el (counsel-async-ignore-re-alist): Extract,
Oleh Krehel <=
- [elpa] master 59603df 383/399: swiper.el (swiper--avy-goto): Fix for a small amount of cands, Oleh Krehel, 2019/07/20
- [elpa] master 5f030d5 381/399: counsel.el (counsel--git-log-format-function): Add, Oleh Krehel, 2019/07/20
- [elpa] master c4c6068 384/399: doc/ivy.org: Fix RET -> C-j, Oleh Krehel, 2019/07/20
- [elpa] master ee5dacf 385/399: Add swiper-backward command, Oleh Krehel, 2019/07/20
- [elpa] master 3c6790f 387/399: ivy.el (ivy-immediate-done): Improve make-directory, Oleh Krehel, 2019/07/20
- [elpa] master 6e50ab6 391/399: ivy-test.el (swiper-isearch-backward): Goto old match on DEL, Oleh Krehel, 2019/07/20
- [elpa] master 714911b 389/399: ivy.el (ivy--sort): Higher priority for ivy-sort-matches-functions-alist, Oleh Krehel, 2019/07/20
- [elpa] master 56a1f7d 386/399: Add counsel-grep-backward and counsel-grep-or-swiper-backward commands, Oleh Krehel, 2019/07/20
- [elpa] master 79de883 388/399: ivy.el (ivy--sort): Simplify, Oleh Krehel, 2019/07/20
- [elpa] master f5508e5 390/399: swiper.el (swiper-isearch-backward): Add backward search, Oleh Krehel, 2019/07/20