[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 2fb8d86 260/272: ivy.el (ivy-done): Allow ivy-dispatching-
From: |
Oleh Krehel |
Subject: |
[elpa] master 2fb8d86 260/272: ivy.el (ivy-done): Allow ivy-dispatching-done to exit with no cands |
Date: |
Mon, 25 Apr 2016 10:13:29 +0000 |
branch: master
commit 2fb8d86b5fa7d621f89cd758ebd6b831089fdd4c
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy-done): Allow ivy-dispatching-done to exit with no cands
Example of use:
(defun ivy-recentf-with-last-input (_x)
(ivy-read "Recentf: " recentf-list
:action (lambda (f)
(with-ivy-window (find-file f)))
:initial-input ivy-text
:caller 'ivy-recentf))
(ivy-set-actions t '(("r" ivy-recentf-with-last-input "recentf")))
The input may match no candidates, but it's still good for
`ivy-recentf-with-last-input', since it uses `ivy-text' instead of
`ivy--current'.
---
ivy.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ivy.el b/ivy.el
index e07fa53..7d705c8 100644
--- a/ivy.el
+++ b/ivy.el
@@ -457,7 +457,10 @@ When non-nil, it should contain at least one %d.")
"Exit the minibuffer with the selected candidate."
(interactive)
(delete-minibuffer-contents)
- (cond ((> ivy--length 0)
+ (cond ((or (> ivy--length 0)
+ ;; the action from `ivy-dispatching-done' may not need a
+ ;; candidate at all
+ (eq this-command 'ivy-dispatching-done))
(ivy--done ivy--current))
((memq (ivy-state-collection ivy-last)
'(read-file-name-internal internal-complete-buffer))
- [elpa] master 6026caf 174/272: counsel.el (counsel-locate-cmd-es): Add, (continued)
- [elpa] master 6026caf 174/272: counsel.el (counsel-locate-cmd-es): Add, Oleh Krehel, 2016/04/25
- [elpa] master 7ed5b06 119/272: ivy.el (ivy--preselect-index): Don't use regexp-quote, Oleh Krehel, 2016/04/25
- [elpa] master dcf4957 123/272: counsel.el (counsel--async-command): Add sentinel and filter args, Oleh Krehel, 2016/04/25
- [elpa] master 53ca6ed 065/272: ivy.el (ivy-do-completion-in-region): New defcustom, Oleh Krehel, 2016/04/25
- [elpa] master ca2b47f 240/272: Add timing information to async commands, Oleh Krehel, 2016/04/25
- [elpa] master d544427 093/272: swiper.el (swiper--re-builder): Replace \t with 4 spaces, Oleh Krehel, 2016/04/25
- [elpa] master 1f3ea7d 095/272: ivy.el (ivy-next-history-element): Handle "M-n M-n" better, Oleh Krehel, 2016/04/25
- [elpa] master ab3ad4e 085/272: doc/ivy.org: Add more CUSTOM_ID, Oleh Krehel, 2016/04/25
- [elpa] master 725e19a 170/272: counsel.el (counsel-ag-occur): Add, Oleh Krehel, 2016/04/25
- [elpa] master ccbf9ef 204/272: Improve counsel-async initial anchoring, Oleh Krehel, 2016/04/25
- [elpa] master 2fb8d86 260/272: ivy.el (ivy-done): Allow ivy-dispatching-done to exit with no cands,
Oleh Krehel <=
- [elpa] master 1c68495 145/272: ivy.el (ivy-expand-file-if-directory): New defun, Oleh Krehel, 2016/04/25
- [elpa] master d4fc54b 110/272: ivy-test.el (counsel-unquote-regex-parens): Add test, Oleh Krehel, 2016/04/25
- [elpa] master 5f0d175 172/272: counsel.el (counsel-prompt-function-dir): Make portable, Oleh Krehel, 2016/04/25
- [elpa] master 5765208 185/272: counsel.el (counsel-pt-base-command): Add regex flag, Oleh Krehel, 2016/04/25
- [elpa] master 67ac850 211/272: counsel.el (counsel-M-x): Add help action, Oleh Krehel, 2016/04/25
- [elpa] master 189c093 207/272: counsel.el (counsel-ace-link): New command, Oleh Krehel, 2016/04/25
- [elpa] master 8c2f213 059/272: counsel.el (counsel-yank-pop): Truncate during display, Oleh Krehel, 2016/04/25
- [elpa] master 5c2c1df 166/272: counsel.el (counsel-git-grep-map): Bind "C-c C-m" to counsel-git-grep-switch-cmd, Oleh Krehel, 2016/04/25
- [elpa] master e6f92fd 191/272: ivy.el (ivy-occur-press): Add counsel-describe-function, Oleh Krehel, 2016/04/25
- [elpa] master 871f78c 168/272: Add optional exit-code table to counsel--async-cmd, Oleh Krehel, 2016/04/25