[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 2877ae1 063/272: ivy.el (ivy-ignore-buffers): New defcusto
From: |
Oleh Krehel |
Subject: |
[elpa] master 2877ae1 063/272: ivy.el (ivy-ignore-buffers): New defcustom |
Date: |
Mon, 25 Apr 2016 10:13:16 +0000 |
branch: master
commit 2877ae13fac87a8c62e88c7ec82ca2f9faca21f8
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy-ignore-buffers): New defcustom
* ivy.el (ivy--buffer-list): Use `ivy-ignore-buffers'.
Fixes #366
---
ivy.el | 34 ++++++++++++++++++++++------------
1 file changed, 22 insertions(+), 12 deletions(-)
diff --git a/ivy.el b/ivy.el
index 911fede..7a3a07c 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2285,21 +2285,31 @@ CANDS is a list of strings."
(setq ivy--virtual-buffers (nreverse virtual-buffers))
(mapcar #'car ivy--virtual-buffers))))
+(defcustom ivy-ignore-buffers nil
+ "List of regexps matching buffer names to ignore."
+ :type '(repeat regexp))
+
(defun ivy--buffer-list (str &optional virtual)
"Return the buffers that match STR.
When VIRTUAL is non-nil, add virtual buffers."
- (delete-dups
- (append
- (mapcar
- (lambda (x)
- (if (with-current-buffer x
- (file-remote-p
- (abbreviate-file-name default-directory)))
- (propertize x 'face 'ivy-remote)
- x))
- (all-completions str 'internal-complete-buffer))
- (and virtual
- (ivy--virtual-buffers)))))
+ (cl-remove-if
+ (lambda (buf)
+ (cl-find-if
+ (lambda (regexp)
+ (string-match regexp buf))
+ ivy-ignore-buffers))
+ (delete-dups
+ (append
+ (mapcar
+ (lambda (x)
+ (if (with-current-buffer x
+ (file-remote-p
+ (abbreviate-file-name default-directory)))
+ (propertize x 'face 'ivy-remote)
+ x))
+ (all-completions str 'internal-complete-buffer))
+ (and virtual
+ (ivy--virtual-buffers))))))
(defun ivy--switch-buffer-action (buffer)
"Switch to BUFFER.
- [elpa] master 9ef344d 062/272: use imenu API to jump to position. required by org-mode, (continued)
- [elpa] master 9ef344d 062/272: use imenu API to jump to position. required by org-mode, Oleh Krehel, 2016/04/25
- [elpa] master 0a9780b 046/272: ivy.el (ivy--recompute-index): Update cl-position logic, Oleh Krehel, 2016/04/25
- [elpa] master 407ce2c 051/272: counsel.el (counsel-list-processes): New command, Oleh Krehel, 2016/04/25
- [elpa] master e3e1f51 052/272: ivy.el (ivy-ffap-url-functions): Customize "C-x C-f M-n", Oleh Krehel, 2016/04/25
- [elpa] master b39f409 056/272: counsel.el (counsel-unicode-char): Display hex codes in left column, Oleh Krehel, 2016/04/25
- [elpa] master eab714f 054/272: counsel.el (counsel-at-git-issue-p): New defun, Oleh Krehel, 2016/04/25
- [elpa] master 4696b89 057/272: ivy.el (ivy-switch-buffer-other-window): New command, Oleh Krehel, 2016/04/25
- [elpa] master 763d42b 048/272: Initialize `ivy-last` to empty state., Oleh Krehel, 2016/04/25
- [elpa] master c0c0f63 060/272: ivy.el (ivy-read): Fix extra actions for completing-read, Oleh Krehel, 2016/04/25
- [elpa] master 5f4bc14 058/272: counsel.el (counsel-rhythmbox-current-song): Preselect the current song, Oleh Krehel, 2016/04/25
- [elpa] master 2877ae1 063/272: ivy.el (ivy-ignore-buffers): New defcustom,
Oleh Krehel <=
- [elpa] master 480cc85 071/272: README.md: Update, Oleh Krehel, 2016/04/25
- [elpa] master 7b08db8 094/272: ivy.el (ivy-next-history-element): Use "\\_<" instead of "\\b", Oleh Krehel, 2016/04/25
- [elpa] master e94f13e 104/272: counsel.el (counsel-imenu): Add :preselect, Oleh Krehel, 2016/04/25
- [elpa] master 3799d3d 109/272: counsel.el: Shuffle functions and rename headings, Oleh Krehel, 2016/04/25
- [elpa] master 7dd85f5 122/272: counsel.el (counsel--async-sentinel): Recognize error codes other than 1, Oleh Krehel, 2016/04/25
- [elpa] master e85ad2c 116/272: counsel.el (counsel-find-file-ignore-regexp): Fixup :type, Oleh Krehel, 2016/04/25
- [elpa] master b8e373a 127/272: swiper.el (swiper-font-lock-ensure): Don't fail when font-lock is off, Oleh Krehel, 2016/04/25
- [elpa] master d8f04f0 061/272: Add melpa version badge, Oleh Krehel, 2016/04/25
- [elpa] master 00b009e 101/272: ivy.el (ivy-next-line-or-history): Update, Oleh Krehel, 2016/04/25
- [elpa] master 142306e 069/272: counsel.el (counsel-git-stash): New command, Oleh Krehel, 2016/04/25