[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 935603e 310/399: ivy.el (ivy--done): Press "RET" or "C-m"
From: |
Oleh Krehel |
Subject: |
[elpa] master 935603e 310/399: ivy.el (ivy--done): Press "RET" or "C-m" to create a directory |
Date: |
Sat, 20 Jul 2019 14:57:46 -0400 (EDT) |
branch: master
commit 935603e8c5ea17d543840dce962824a90e3b5c70
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy--done): Press "RET" or "C-m" to create a directory
Currently, `dired-create-directory' and `make-directory' are detected
via their prompt string. Not the best, but likely works 99% of the
time as is less frustrating for new users.
---
ivy.el | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/ivy.el b/ivy.el
index e9aaf14..3c9da58 100644
--- a/ivy.el
+++ b/ivy.el
@@ -685,14 +685,16 @@ N is obtained from `ivy-more-chars-alist'."
(defun ivy--done (text)
"Insert TEXT and exit minibuffer."
- (insert
- (setf (ivy-state-current ivy-last)
- (if (and ivy--directory
- (not (eq (ivy-state-history ivy-last) 'grep-files-history)))
- (expand-file-name text ivy--directory)
- text)))
- (setq ivy-exit 'done)
- (exit-minibuffer))
+ (if (member (ivy-state-prompt ivy-last) '("Create directory: " "Make
directory: "))
+ (ivy-immediate-done)
+ (insert
+ (setf (ivy-state-current ivy-last)
+ (if (and ivy--directory
+ (not (eq (ivy-state-history ivy-last)
'grep-files-history)))
+ (expand-file-name text ivy--directory)
+ text)))
+ (setq ivy-exit 'done)
+ (exit-minibuffer)))
(defcustom ivy-use-selectable-prompt nil
"When non-nil, make the prompt line selectable like a candidate.
- [elpa] master a249d15 329/399: ivy-test.el (ivy-avy): Only run if avy is installed, (continued)
- [elpa] master a249d15 329/399: ivy-test.el (ivy-avy): Only run if avy is installed, Oleh Krehel, 2019/07/20
- [elpa] master 15f8e10 330/399: .travis.yml: Add emacs-25.3 and emacs-26.2, Oleh Krehel, 2019/07/20
- [elpa] master d752db5 333/399: counsel.el (counsel-find-file-extern-extensions): New defcustom, Oleh Krehel, 2019/07/20
- [elpa] master cfb8d49 335/399: counsel.el (counsel-find-file-ignore-regexp): Add lockfiles to dotfiles, Oleh Krehel, 2019/07/20
- [elpa] master 011626a 343/399: ivy.el (ivy-occur-press): Improve when window config changed, Oleh Krehel, 2019/07/20
- [elpa] master 8db9cc1 349/399: swiper.el (swiper--add-cursor-overlay): Avoid a very wide cursor on tab chars, Oleh Krehel, 2019/07/20
- [elpa] master 40d8114 338/399: counsel.el (counsel-shell-command-history): Remove obsolete command, Oleh Krehel, 2019/07/20
- [elpa] master f0a2341 337/399: counsel.el (counsel-rhythmbox): Add :require-match, Oleh Krehel, 2019/07/20
- [elpa] master 4de54f1 340/399: ivy.el (ivy-reverse-i-search-kill): Add and bind to "C-k", Oleh Krehel, 2019/07/20
- [elpa] master 7201c0f 334/399: ivy-hydra.el (ivy-dispatching-done-hydra-exit-keys): Extract, Oleh Krehel, 2019/07/20
- [elpa] master 935603e 310/399: ivy.el (ivy--done): Press "RET" or "C-m" to create a directory,
Oleh Krehel <=
- [elpa] master a20c196 336/399: counsel.el (counsel-set-variable): Better annotations for options, Oleh Krehel, 2019/07/20
- [elpa] master cea24b7 339/399: counsel.el (counsel-expression-history): Remove obsolete command, Oleh Krehel, 2019/07/20
- [elpa] master 9f6141f 345/399: counsel.el (counsel--browse-history): Allow to remove elements with "C-k", Oleh Krehel, 2019/07/20
- [elpa] master 673c45e 342/399: ivy.el (ivy--minibuffer-setup): Set line-spacing to nil in the minibuffer, Oleh Krehel, 2019/07/20
- [elpa] master 8d7578f 346/399: counsel.el (counsel--browse-history): Better prompt, Oleh Krehel, 2019/07/20
- [elpa] master f9e8116 344/399: swiper.el (swiper-isearch-action): Fix outlines getting over-revealed, Oleh Krehel, 2019/07/20
- [elpa] master f29207f 324/399: Add ability to resume dynamic collections, Oleh Krehel, 2019/07/20
- [elpa] master 3b1a25b 331/399: ivy-test.el (counsel-find-file-with-dotfiles): Fix, Oleh Krehel, 2019/07/20
- [elpa] master 8fc254f 341/399: counsel.el (counsel--setq-doconst): Fix compiler warning, Oleh Krehel, 2019/07/20
- [elpa] master 1c436f6 347/399: ivy.el (ivy-reverse-i-search): Don't call another ivy-reverse-i-search, Oleh Krehel, 2019/07/20