[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 4ad797b 002/167: Improve "C-g" out of a long-running async
From: |
Oleh Krehel |
Subject: |
[elpa] master 4ad797b 002/167: Improve "C-g" out of a long-running async process |
Date: |
Tue, 08 Dec 2015 10:49:32 +0000 |
branch: master
commit 4ad797bf49ef4a160ad556cdb2a284b9abf40e8d
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Improve "C-g" out of a long-running async process
* counsel.el (counsel-delete-process): New defun.
(counsel-locate):
(counsel-ag): Use `counsel-delete-process' as :unwind.
---
counsel.el | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/counsel.el b/counsel.el
index 22dc505..129a8ce 100644
--- a/counsel.el
+++ b/counsel.el
@@ -556,6 +556,11 @@ Skip some dotfiles unless `ivy-text' requires them."
(ivy--regex str))))
'("" "working...")))
+(defun counsel-delete-process ()
+ (let ((process (get-process " *counsel*")))
+ (when process
+ (delete-process process))))
+
;;;###autoload
(defun counsel-locate ()
"Call locate shell command."
@@ -565,7 +570,8 @@ Skip some dotfiles unless `ivy-text' requires them."
:history 'counsel-locate-history
:action (lambda (file)
(when file
- (find-file file)))))
+ (find-file file)))
+ :unwind #'counsel-delete-process))
(defun counsel--generic (completion-fn)
"Complete thing at point with COMPLETION-FN."
@@ -1000,7 +1006,9 @@ INITIAL-INPUT can be given as the initial minibuffer
input."
:dynamic-collection t
:history 'counsel-git-grep-history
:action #'counsel-git-grep-action
- :unwind #'swiper--cleanup))
+ :unwind (lambda ()
+ (counsel-delete-process)
+ (swiper--cleanup))))
(defun counsel-recoll-function (string &optional _pred &rest _unused)
"Grep in the current directory for STRING."
- [elpa] master updated (a0561bf -> 1f3fa31), Oleh Krehel, 2015/12/08
- [elpa] master a71d5c8 001/167: ivy.el (ivy--insert-prompt): Improve truncation, Oleh Krehel, 2015/12/08
- [elpa] master e70ca07 003/167: ivy.el (ivy-call): "C-M-n" should not leave the minibuffer, Oleh Krehel, 2015/12/08
- [elpa] master 4ad797b 002/167: Improve "C-g" out of a long-running async process,
Oleh Krehel <=
- [elpa] master 41b5850 005/167: ivy.el (ivy--regex-fuzzy): Add minibuffer highlighting, Oleh Krehel, 2015/12/08
- [elpa] master 19d2a40 004/167: Add flx sorting, Oleh Krehel, 2015/12/08
- [elpa] master 3146501 010/167: ivy.el (ivy-resume): Don't regexp-quote preselect, Oleh Krehel, 2015/12/08
- [elpa] master f04aec8 009/167: ivy-hydra.el: Bind "t" to toggle-truncate-lines, Oleh Krehel, 2015/12/08
- [elpa] master 82a317c 011/167: Make swiper compatible with visual-line-mode, Oleh Krehel, 2015/12/08
- [elpa] master 45b54e3 015/167: counsel.el (counsel--gg-count): Fix for "'" in query, Oleh Krehel, 2015/12/08
- [elpa] master 6bf3239 006/167: ivy.el (ivy-yank-word): Add only one space each time, Oleh Krehel, 2015/12/08
- [elpa] master 73e5799 012/167: Fix counsel-git-grep not updating to 0 candidates, Oleh Krehel, 2015/12/08
- [elpa] master dfb41d0 016/167: Implement ivy-avy, Oleh Krehel, 2015/12/08
- [elpa] master eda091b 017/167: Customize ivy-avy and fix compile warnings, Oleh Krehel, 2015/12/08