[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master fef96f4 139/399: counsel.el (counsel--find-file-1): Extrac
From: |
Oleh Krehel |
Subject: |
[elpa] master fef96f4 139/399: counsel.el (counsel--find-file-1): Extract |
Date: |
Sat, 20 Jul 2019 14:57:10 -0400 (EDT) |
branch: master
commit fef96f414ee00a836a7ebd173a6d90297640a4f0
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel--find-file-1): Extract
---
counsel.el | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/counsel.el b/counsel.el
index 970da1b..6b9a8ba 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1837,20 +1837,26 @@ The preselect behaviour can be customized via user
options
buffer-file-name
(file-name-nondirectory buffer-file-name))))
-;;;###autoload
-(defun counsel-find-file (&optional initial-input)
- "Forward to `find-file'.
-When INITIAL-INPUT is non-nil, use it in the minibuffer during completion."
- (interactive)
- (ivy-read "Find file: " #'read-file-name-internal
+(defun counsel--find-file-1 (prompt initial-input action caller)
+ (ivy-read prompt #'read-file-name-internal
:matcher #'counsel--find-file-matcher
:initial-input initial-input
- :action #'counsel-find-file-action
+ :action action
:preselect (counsel--preselect-file)
:require-match 'confirm-after-completion
:history 'file-name-history
:keymap counsel-find-file-map
- :caller 'counsel-find-file))
+ :caller caller))
+
+;;;###autoload
+(defun counsel-find-file (&optional initial-input)
+ "Forward to `find-file'.
+When INITIAL-INPUT is non-nil, use it in the minibuffer during completion."
+ (interactive)
+ (counsel--find-file-1
+ "Find file: " initial-input
+ #'counsel-find-file-action
+ 'counsel-find-file))
(ivy-set-occur 'counsel-find-file 'counsel-find-file-occur)
- [elpa] master 31a554d 130/399: swiper.el (swiper-isearch): Anchor to line-beginning-position, (continued)
- [elpa] master 31a554d 130/399: swiper.el (swiper-isearch): Anchor to line-beginning-position, Oleh Krehel, 2019/07/20
- [elpa] master adad2e4 127/399: counsel.el: Strip space from initial input of counsel-package, Oleh Krehel, 2019/07/20
- [elpa] master df8901f 132/399: swiper.el (swiper-query-replace): Add preview overlays, Oleh Krehel, 2019/07/20
- [elpa] master dc3f469 131/399: swiper.el (swiper-isearch): Extend, Oleh Krehel, 2019/07/20
- [elpa] master bc479ed 134/399: swiper.el (swiper-isearch): Fix minibuffer height, Oleh Krehel, 2019/07/20
- [elpa] master fa2e02d 137/399: ivy-overlay.el (ivy-cursor): Customize for dark background, Oleh Krehel, 2019/07/20
- [elpa] master 8edde1c 135/399: swiper.el (swiper-isearch): Change prompt, Oleh Krehel, 2019/07/20
- [elpa] master 66961f8 138/399: swiper.el (swiper-isearch-action): Add a cursor overlay, Oleh Krehel, 2019/07/20
- [elpa] master ce31009 144/399: swiper.el (swiper-isearch-function): Use text with faces, Oleh Krehel, 2019/07/20
- [elpa] master 8229304 141/399: ivy.el: Add display transformer for counsel-dired, Oleh Krehel, 2019/07/20
- [elpa] master fef96f4 139/399: counsel.el (counsel--find-file-1): Extract,
Oleh Krehel <=
- [elpa] master 3b40e99 142/399: swiper.el (swiper-isearch-action): Fix fake cursor at eol, Oleh Krehel, 2019/07/20
- [elpa] master eaba38a 145/399: counsel.el (counsel-dired-jump-args): Fix for OSX, Oleh Krehel, 2019/07/20
- [elpa] master 7c9d960 143/399: swiper.el (swiper--add-cursor-overlay): Extract, Oleh Krehel, 2019/07/20
- [elpa] master 9988904 150/399: counsel.el (counsel--switch-buffer-update-fn): Fix for when find-file fails, Oleh Krehel, 2019/07/20
- [elpa] master 05a4e59 147/399: Do not use invalid :preselect as a regexp, Oleh Krehel, 2019/07/20
- [elpa] master 3ab3d5f 152/399: swiper.el (swiper-isearch): Check executing-kbd-macro, Oleh Krehel, 2019/07/20
- [elpa] master 302d23f 149/399: counsel.el: Fix org-version testing, Oleh Krehel, 2019/07/20
- [elpa] master cd41f70 153/399: ivy-test.el: Add inhibit-message, Oleh Krehel, 2019/07/20
- [elpa] master 1df4ccf 154/399: ivy.el (ivy-occur-revert-buffer): Add swiper-isearch, Oleh Krehel, 2019/07/20
- [elpa] master 4f1bbc1 151/399: swiper.el (swiper-isearch-function): Full point history for DEL, Oleh Krehel, 2019/07/20