[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 5f7c787 11/90: counsel.el (counsel-find-file-at-point): Ne
From: |
Oleh Krehel |
Subject: |
[elpa] master 5f7c787 11/90: counsel.el (counsel-find-file-at-point): New defcustom |
Date: |
Tue, 30 Jun 2015 07:28:03 +0000 |
branch: master
commit 5f7c787a08619dcf54df2e1c716b9153b69450eb
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-find-file-at-point): New defcustom
* counsel.el (counsel-find-file): When `counsel-find-file-at-point' is
non-nil, add the file at point to the list of candidates.
Fixes #123
---
counsel.el | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/counsel.el b/counsel.el
index aae7c72..f27095e 100644
--- a/counsel.el
+++ b/counsel.el
@@ -259,6 +259,10 @@
:action #'counsel-git-grep-action
:unwind #'swiper--cleanup)))
+(defcustom counsel-find-file-at-point nil
+ "When non-nil, add file-at-point to the list of candidates."
+ :type 'boolean)
+
(defun counsel-find-file ()
"Forward to `find-file'."
(interactive)
@@ -266,7 +270,10 @@
:matcher #'counsel--find-file-matcher
:action
(lambda (x)
- (find-file (expand-file-name x ivy--directory)))))
+ (find-file (expand-file-name x ivy--directory)))
+ :preselect (when counsel-find-file-at-point
+ (require 'ffap)
+ (ffap-guesser))))
(defcustom counsel-find-file-ignore-regexp "\\(?:\\`[#.]\\)\\|\\(?:[#~]\\'\\)"
"A regexp of files to ignore while in `counsel-find-file'.
- [elpa] master updated (e8eaf1a -> 55e0188), Oleh Krehel, 2015/06/30
- [elpa] master 4a3d0be 01/90: swiper.el (swiper-avy): Use only the current window, Oleh Krehel, 2015/06/30
- [elpa] master 856e1bd 02/90: ivy.el (ivy-next-line): Fix wraparound at end of candidates, Oleh Krehel, 2015/06/30
- [elpa] master 04b5734 03/90: swiper.el (swiper-avy): Don't start on empty input, Oleh Krehel, 2015/06/30
- [elpa] master 23ffd5c 04/90: swiper.el (swiper--ivy): Don't double-quote preselect, Oleh Krehel, 2015/06/30
- [elpa] master d975e1a 06/90: Avoid ensuring font lock when magit-blame-mode is active, Oleh Krehel, 2015/06/30
- [elpa] master 5fdb7de 05/90: Allow to open an Info file on the file system, Oleh Krehel, 2015/06/30
- [elpa] master f899a22 08/90: Add info lookup binding to counsel-describe-map, Oleh Krehel, 2015/06/30
- [elpa] master a0347d8 09/90: counsel.el (counsel-info-lookup-symbol): Add a require, Oleh Krehel, 2015/06/30
- [elpa] master 3256d68 07/90: Change the :matcher interface, Oleh Krehel, 2015/06/30
- [elpa] master 5f7c787 11/90: counsel.el (counsel-find-file-at-point): New defcustom,
Oleh Krehel <=
- [elpa] master efd74b8 10/90: counsel.el (counsel-find-file): Extend `find-file', Oleh Krehel, 2015/06/30
- [elpa] master 8212110 15/90: Handle symbol-at-point better in non-Elisp buffers, Oleh Krehel, 2015/06/30
- [elpa] master fe057eb 14/90: Swiper should preserve column for empty input, Oleh Krehel, 2015/06/30
- [elpa] master 1a193b0 16/90: ivy.el (ivy--done): Set ivy--current, Oleh Krehel, 2015/06/30
- [elpa] master 97abd3c 17/90: ivy.el (ivy-virtual): New defface, Oleh Krehel, 2015/06/30
- [elpa] master 3c8daba 19/90: Fixup compilation warnings, Oleh Krehel, 2015/06/30
- [elpa] master ecb93a6 18/90: Regexp-quote name of candidate buffer to be preselected, Oleh Krehel, 2015/06/30
- [elpa] master 40a938b 21/90: ivy.el (ivy-minibuffer-map): Bind ivy-yank-word to "M-j", Oleh Krehel, 2015/06/30
- [elpa] master 00a1b02 22/90: counsel-git-grep should quote strings better, Oleh Krehel, 2015/06/30
- [elpa] master 52a083e 13/90: ivy.el (ivy-yank-word): New command, Oleh Krehel, 2015/06/30