[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 25e1444 257/272: ivy.el (ivy-use-ignore-default): New defc
From: |
Oleh Krehel |
Subject: |
[elpa] master 25e1444 257/272: ivy.el (ivy-use-ignore-default): New defcustom |
Date: |
Mon, 25 Apr 2016 10:13:29 +0000 |
branch: master
commit 25e1444f0a129f1357419cbb4ed1cdf7f51ceb7d
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy-use-ignore-default): New defcustom
* ivy.el (ivy-use-ignore): Is now set to `ivy-use-ignore-default'.
(ivy-toggle-ignore): Update.
(ivy--reset-state): Update.
(ivy--switch-buffer-matcher): When `ivy-use-ignore' is t, and they
only cands that match the input also match `ivy-ignore-buffers' show
them anyway. But when `ivy-use-ignore' is 'always, show nothing in that
case.
Fixes #477
---
ivy.el | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/ivy.el b/ivy.el
index 674e487..e3e05b7 100644
--- a/ivy.el
+++ b/ivy.el
@@ -359,8 +359,17 @@ sources. These values will subsequently be filtered on
`ivy-text'.
This variable is set by `ivy-read' and used by `ivy--set-candidates'.")
+(defcustom ivy-use-ignore-default t
+ "The default policy for user-configured candidate filtering."
+ :type '(choice
+ (const :tag "Ignore ignored always" always)
+ (const :tag "Ignore ignored when others exist" t)
+ (const :tag "Don't ignore" nil)))
+
(defvar ivy-use-ignore t
- "Store policy for user-configured candidate filtering.")
+ "Store policy for user-configured candidate filtering.
+This may be changed dynamically by `ivy-toggle-ignore'.
+Use `ivy-use-ignore-default' for a permanent configuration.")
(defvar ivy--default nil
"Default initial input.")
@@ -808,7 +817,10 @@ If the input is empty, select the previous history element
instead."
(defun ivy-toggle-ignore ()
"Toggle user-configured candidate filtering."
(interactive)
- (setq ivy-use-ignore (null ivy-use-ignore))
+ (setq ivy-use-ignore
+ (if ivy-use-ignore
+ nil
+ (or ivy-use-ignore-default t)))
;; invalidate cache
(setq ivy--old-cands nil))
@@ -1389,7 +1401,7 @@ This is useful for recursive `ivy-read'."
(setq ivy--full-length nil)
(setq ivy-text "")
(setq ivy-calling nil)
- (setq ivy-use-ignore t)
+ (setq ivy-use-ignore ivy-use-ignore-default)
(let (coll sort-fn)
(cond ((eq collection 'Info-read-node-name-1)
(if (equal Info-current-file "dir")
@@ -2682,7 +2694,8 @@ Skip buffers that match `ivy-ignore-buffers'."
(string-match-p f-or-r buf)))
ivy-ignore-buffers))
res)
- res))))
+ (and (eq ivy-use-ignore t)
+ res)))))
(ivy-set-display-transformer
'ivy-switch-buffer 'ivy-switch-buffer-transformer)
- [elpa] master d40bdab 134/272: doc/ivy.org: Fix typo, (continued)
- [elpa] master d40bdab 134/272: doc/ivy.org: Fix typo, Oleh Krehel, 2016/04/25
- [elpa] master 1c45b29 150/272: ivy-occur-mode: new commands on "j", "k", "c", Oleh Krehel, 2016/04/25
- [elpa] master c68d2cc 189/272: ivy.el (ivy-thing-at-point): Try ffap-file-at-point, Oleh Krehel, 2016/04/25
- [elpa] master d6b18f0 151/272: ivy.el (ivy-occur-press): Pulse no longer, Oleh Krehel, 2016/04/25
- [elpa] master b3ca886 133/272: counsel.el (counsel--generic): Improve, Oleh Krehel, 2016/04/25
- [elpa] master c8013c7 053/272: counsel.el (ivy-ffap-url-functions): Add Emacs git repo, Oleh Krehel, 2016/04/25
- [elpa] master 1d3f080 263/272: ivy.el (ivy--magic-file-slash): Allow "non-existing-dir//", Oleh Krehel, 2016/04/25
- [elpa] master 37d52cc 120/272: swiper.el (swiper--update-input-ivy): Replace "\t", Oleh Krehel, 2016/04/25
- [elpa] master 07624b3 180/272: Fix compilation warnings, Oleh Krehel, 2016/04/25
- [elpa] master f3b2640 124/272: swiper.el (swiper--ivy): Update signature, Oleh Krehel, 2016/04/25
- [elpa] master 25e1444 257/272: ivy.el (ivy-use-ignore-default): New defcustom,
Oleh Krehel <=
- [elpa] master c9b6e02 230/272: Make sure user keybindings are respected, Oleh Krehel, 2016/04/25
- [elpa] master 5f58f9c 262/272: counsel.el (counsel--async-sentinel): Add safeguard to time-since, Oleh Krehel, 2016/04/25
- [elpa] master e5b7218 158/272: Fix swiper not revealing org overlay when at heading body end, Oleh Krehel, 2016/04/25
- [elpa] master c24b6de 217/272: swiper.el (swiper-query-replace): Improve "M-n", Oleh Krehel, 2016/04/25
- [elpa] master c27cde2 072/272: ivy.el (ivy--reset-state): Don't deactivate region, Oleh Krehel, 2016/04/25
- [elpa] master a9205fa 232/272: counsel.el (counsel-expression-history): New command, Oleh Krehel, 2016/04/25
- [elpa] master 88169a3 147/272: "C-x C-f" can un-ignore dotfiles with a leading dot input, Oleh Krehel, 2016/04/25
- [elpa] master b4b8d3e 106/272: counsel.el: Organize the file with outlines, Oleh Krehel, 2016/04/25
- [elpa] master 2905d17 153/272: doc/ivy.org: fix typos, Oleh Krehel, 2016/04/25
- [elpa] master 4c81973 181/272: counsel.el (counsel-locate-cmd-es): Fix regex, Oleh Krehel, 2016/04/25