[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 6263d04 193/399: counsel.el (counsel-find-file): Improve m
From: |
Oleh Krehel |
Subject: |
[elpa] master 6263d04 193/399: counsel.el (counsel-find-file): Improve mkdir action with ivy-call |
Date: |
Sat, 20 Jul 2019 14:57:21 -0400 (EDT) |
branch: master
commit 6263d040ae939c89da9698fc7923d54d4cd63321
Author: Eric Danan <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-find-file): Improve mkdir action with ivy-call
Make ivy-call cd into created directory.
---
counsel.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/counsel.el b/counsel.el
index a963ca2..e6dd8d7 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1774,7 +1774,12 @@ choose between `yes-or-no-p' and `y-or-n-p'; otherwise
default to
:caller 'counsel-find-file-move))
(defun counsel-find-file-mkdir-action (_x)
- (make-directory (expand-file-name ivy-text ivy--directory)))
+ "Create a directory from `ivy-text'."
+ (let ((dir (expand-file-name ivy-text ivy--directory))
+ (win (and (not (eq ivy-exit 'done))
+ (active-minibuffer-window))))
+ (make-directory dir)
+ (when win (with-selected-window win (ivy--cd dir)))))
(ivy-set-actions
'counsel-find-file
- [elpa] master 5115df3 184/399: counsel.el: counsel-switch-buffer-other-window: new command., (continued)
- [elpa] master 5115df3 184/399: counsel.el: counsel-switch-buffer-other-window: new command., Oleh Krehel, 2019/07/20
- [elpa] master 0a12708 164/399: swiper.el: Add swiper background faces, Oleh Krehel, 2019/07/20
- [elpa] master 7e73580 171/399: ivy-test.el (counsel-find-file-with-dollars): Add test, Oleh Krehel, 2019/07/20
- [elpa] master c47a7dc 176/399: ivy.el (ivy--filter): Don't cache if the result of matching cache is empty, Oleh Krehel, 2019/07/20
- [elpa] master 4171364 183/399: ivy-test.el (counsel-find-file-with-dotfiles): Disable for emacs27, Oleh Krehel, 2019/07/20
- [elpa] master d829338 190/399: counsel.el (counsel-recentf): Require match, Oleh Krehel, 2019/07/20
- [elpa] master 39f5c24 187/399: ivy-test.el: Use :expected-result, Oleh Krehel, 2019/07/20
- [elpa] master a9f9e41 189/399: Add counsel-descbinds-action-exec, Oleh Krehel, 2019/07/20
- [elpa] master 80d9c17 188/399: Makefile: Clone tests/ if needed, Oleh Krehel, 2019/07/20
- [elpa] master 6516265 192/399: ivy-overlay.el: Do not assume in-buffer completion, Oleh Krehel, 2019/07/20
- [elpa] master 6263d04 193/399: counsel.el (counsel-find-file): Improve mkdir action with ivy-call,
Oleh Krehel <=
- [elpa] master 31e57e7 181/399: ivy-test.el (counsel-find-file-with-dotfiles): Disable for older Emacs, Oleh Krehel, 2019/07/20
- [elpa] master f52b0ac 175/399: ivy.el (ivy--filter): Don't cache if ivy--old-cands is empty, Oleh Krehel, 2019/07/20
- [elpa] master 2221a5c 177/399: ivy-test.el (counsel-find-file-with-dotfiles): Add test, Oleh Krehel, 2019/07/20
- [elpa] master 0467f5b 191/399: doc/ivy.org: Correct typo, Oleh Krehel, 2019/07/20
- [elpa] master e3f8908 186/399: ivy-test.el: Make friendlier, Oleh Krehel, 2019/07/20
- [elpa] master 891be1d 199/399: counsel.el (counsel-org-file): Handle ATTACH_DIR property, Oleh Krehel, 2019/07/20
- [elpa] master 4f12a59 196/399: counsel.el (counsel-find-file-mkdir-action): Add trailing "/", Oleh Krehel, 2019/07/20
- [elpa] master 62a2c7e 195/399: counsel.el (counsel-find-file): Improve copy and move actions, Oleh Krehel, 2019/07/20
- [elpa] master d8136a2 200/399: doc/ivy.org: Remove outdated magit customization, Oleh Krehel, 2019/07/20
- [elpa] master ca8d5ba 197/399: ivy.el (ivy-partial): Adjust ivy-tab-space when one candidate, Oleh Krehel, 2019/07/20