[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master d752db5 333/399: counsel.el (counsel-find-file-extern-exte
From: |
Oleh Krehel |
Subject: |
[elpa] master d752db5 333/399: counsel.el (counsel-find-file-extern-extensions): New defcustom |
Date: |
Sat, 20 Jul 2019 14:57:51 -0400 (EDT) |
branch: master
commit d752db5f3f0e40484aaac39694bf4a45ac0cb29f
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-find-file-extern-extensions): New defcustom
Allows us to press "RET" instead of "M-o x" like we did before.
---
counsel.el | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/counsel.el b/counsel.el
index ea8265c..bd6da76 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1857,14 +1857,21 @@ Skip some dotfiles unless `ivy-text' requires them."
(defvar counsel-find-file-speedup-remote t
"Speed up opening remote files by disabling `find-file-hook' for them.")
+(defcustom counsel-find-file-extern-extensions '("mp4" "mkv" "xlsx")
+ "List of extensions that make `counsel-find-file' use
`counsel-find-file-extern'."
+ :type '(repeat string))
+
(defun counsel-find-file-action (x)
"Find file X."
(with-ivy-window
- (if (and counsel-find-file-speedup-remote
- (file-remote-p ivy--directory))
- (let ((find-file-hook nil))
- (find-file (expand-file-name x ivy--directory)))
- (find-file (expand-file-name x ivy--directory)))))
+ (cond ((and counsel-find-file-speedup-remote
+ (file-remote-p ivy--directory))
+ (let ((find-file-hook nil))
+ (find-file (expand-file-name x ivy--directory))))
+ ((member (file-name-extension x) counsel-find-file-extern-extensions)
+ (counsel-find-file-extern x))
+ (t
+ (find-file (expand-file-name x ivy--directory))))))
(defun counsel--preselect-file ()
"Return candidate to preselect during filename completion.
- [elpa] master d260c48 322/399: swiper.el: Obey search-invisible, (continued)
- [elpa] master d260c48 322/399: swiper.el: Obey search-invisible, Oleh Krehel, 2019/07/20
- [elpa] master de8842e 323/399: Add ivy-switch-buffer-map to counsel-switch-buffer, Oleh Krehel, 2019/07/20
- [elpa] master 0d87297 326/399: counsel.el (counsel-open-buffer-file-externally): Cleanup, Oleh Krehel, 2019/07/20
- [elpa] master 7defba2 327/399: ivy.el (ivy-avy): Fix when there's a scroll, Oleh Krehel, 2019/07/20
- [elpa] master 07c65b3 325/399: ivy.el (ivy--set-index-dynamic-collection): Extract, Oleh Krehel, 2019/07/20
- [elpa] master 400d56f 319/399: counsel.el (counsel-open-buffer-file-externally): New function, Oleh Krehel, 2019/07/20
- [elpa] master 704b1de 328/399: ivy.el (ivy-avy): Allow to scroll with "C-v" and "M-v", Oleh Krehel, 2019/07/20
- [elpa] master 7183491 332/399: ivy.el (ivy--minibuffer-setup): Avoid extra call to ivy--exhibit, Oleh Krehel, 2019/07/20
- [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 <=
- [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, 2019/07/20
- [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