[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 9e87993 113/348: ivy.el (ivy-state): directory field store
From: |
Oleh Krehel |
Subject: |
[elpa] master 9e87993 113/348: ivy.el (ivy-state): directory field stores default-directory |
Date: |
Sat, 8 Apr 2017 11:03:38 -0400 (EDT) |
branch: master
commit 9e879934d6c39e009179ca783d1f8a332a11e0e1
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy-state): directory field stores default-directory
* ivy.el (ivy-resume): Let `default-directory' to (ivy-state-directory
ivy-last).
(ivy-read): Set (ivy-state-directory ivy-last) to `default-directory'.
Fixes #591
---
ivy.el | 41 ++++++++++++++++++++++-------------------
1 file changed, 22 insertions(+), 19 deletions(-)
diff --git a/ivy.el b/ivy.el
index 49c28bf..36b4b94 100644
--- a/ivy.el
+++ b/ivy.el
@@ -314,6 +314,7 @@ action functions.")
dynamic-collection
;; A lambda that transforms candidates only for display
display-transformer-fn
+ directory
caller)
(defvar ivy-last (make-ivy-state)
@@ -733,25 +734,26 @@ If the text hasn't changed as a result, forward to
`ivy-alt-done'."
(when (eq (ivy-state-caller ivy-last) 'swiper)
(switch-to-buffer (ivy-state-buffer ivy-last)))
(with-current-buffer (ivy-state-buffer ivy-last)
- (ivy-read
- (ivy-state-prompt ivy-last)
- (ivy-state-collection ivy-last)
- :predicate (ivy-state-predicate ivy-last)
- :require-match (ivy-state-require-match ivy-last)
- :initial-input ivy-text
- :history (ivy-state-history ivy-last)
- :preselect (unless (eq (ivy-state-collection ivy-last)
- 'read-file-name-internal)
- ivy--current)
- :keymap (ivy-state-keymap ivy-last)
- :update-fn (ivy-state-update-fn ivy-last)
- :sort (ivy-state-sort ivy-last)
- :action (ivy-state-action ivy-last)
- :unwind (ivy-state-unwind ivy-last)
- :re-builder (ivy-state-re-builder ivy-last)
- :matcher (ivy-state-matcher ivy-last)
- :dynamic-collection (ivy-state-dynamic-collection ivy-last)
- :caller (ivy-state-caller ivy-last)))))
+ (let ((default-directory (ivy-state-directory ivy-last)))
+ (ivy-read
+ (ivy-state-prompt ivy-last)
+ (ivy-state-collection ivy-last)
+ :predicate (ivy-state-predicate ivy-last)
+ :require-match (ivy-state-require-match ivy-last)
+ :initial-input ivy-text
+ :history (ivy-state-history ivy-last)
+ :preselect (unless (eq (ivy-state-collection ivy-last)
+ 'read-file-name-internal)
+ ivy--current)
+ :keymap (ivy-state-keymap ivy-last)
+ :update-fn (ivy-state-update-fn ivy-last)
+ :sort (ivy-state-sort ivy-last)
+ :action (ivy-state-action ivy-last)
+ :unwind (ivy-state-unwind ivy-last)
+ :re-builder (ivy-state-re-builder ivy-last)
+ :matcher (ivy-state-matcher ivy-last)
+ :dynamic-collection (ivy-state-dynamic-collection ivy-last)
+ :caller (ivy-state-caller ivy-last))))))
(defvar-local ivy-calling nil
"When non-nil, call the current action when `ivy--index' changes.")
@@ -1405,6 +1407,7 @@ customizations apply to the current completion session."
:matcher matcher
:dynamic-collection dynamic-collection
:display-transformer-fn transformer-fn
+ :directory default-directory
:caller caller))
(ivy--reset-state ivy-last)
(prog1
- [elpa] master 9bd79da 074/348: ivy.el (ivy-set-prompt): New API, (continued)
- [elpa] master 9bd79da 074/348: ivy.el (ivy-set-prompt): New API, Oleh Krehel, 2017/04/08
- [elpa] master 72dcca5 082/348: ivy.el (ivy-push-view): Work properly for dired-mode, Oleh Krehel, 2017/04/08
- [elpa] master 3d7e1ef 083/348: ivy.el (ivy--switch-buffer-action): Improve, Oleh Krehel, 2017/04/08
- [elpa] master 055e7b8 102/348: counsel.el (counsel-git-grep-cmd-history): Update default, Oleh Krehel, 2017/04/08
- [elpa] master 7e188d5 100/348: counsel.el (counsel-git-grep): Customize re-builder, Oleh Krehel, 2017/04/08
- [elpa] master 1da8b6c 086/348: Fix foo!bar syntax for swiper, Oleh Krehel, 2017/04/08
- [elpa] master 57c0f5e 095/348: ivy.el (ivy-set-view-recur): Account for mulitple same kind splits, Oleh Krehel, 2017/04/08
- [elpa] master c84b681 109/348: ivy.el (ivy-switch-buffer): Reset index to 0 on input, Oleh Krehel, 2017/04/08
- [elpa] master 0f4acb3 115/348: Make swiper-all async, Oleh Krehel, 2017/04/08
- [elpa] master 81e14ce 111/348: counsel.el (counsel-semantic): Fix warnings, Oleh Krehel, 2017/04/08
- [elpa] master 9e87993 113/348: ivy.el (ivy-state): directory field stores default-directory,
Oleh Krehel <=
- [elpa] master 1fa9a28 118/348: Ensure regex is a sting, Oleh Krehel, 2017/04/08
- [elpa] master 70a5360 127/348: counsel.el (counsel-git-grep-proj-function): Use greedy regex, Oleh Krehel, 2017/04/08
- [elpa] master 83f7ae6 129/348: counsel.el (counsel-yank-pop): Fix candidates not showing sometimes, Oleh Krehel, 2017/04/08
- [elpa] master 8f282a5 136/348: counsel.el (counsel-git-grep-action): Reveal text in outlines, Oleh Krehel, 2017/04/08
- [elpa] master bc96feb 141/348: ivy.el (ivy--recompute-index): Update condition, Oleh Krehel, 2017/04/08
- [elpa] master 45e29af 147/348: counsel.el: Fix compile warning, Oleh Krehel, 2017/04/08
- [elpa] master 04c2160 151/348: Replace references to evil-jumper with evil-jumps, Oleh Krehel, 2017/04/08
- [elpa] master c2974a5 154/348: Depend on Emacs 24.3, since user-error is used, Oleh Krehel, 2017/04/08
- [elpa] master e9db958 145/348: Rename ivy-recentf -> counsel-recentf, Oleh Krehel, 2017/04/08
- [elpa] master 78be161 165/348: Fix alist and :predicate interaction, Oleh Krehel, 2017/04/08