* ivy.el (ivy--buffer-list): Add PREDICATE parameter and pass to
'all-completions'
(ivy--reset-state): Pass predicate parameter to 'ivy--buffer-list'.
This allows 'read-buffer' to filter the buffers with the PREDICATE parameter.
(not (equal (ivy--get-action ivy-last) 'identity)))
(setq initial-input nil))))
((eq collection 'internal-complete-buffer)
(not (equal (ivy--get-action ivy-last) 'identity)))
(setq initial-input nil))))
((eq collection 'internal-complete-buffer)
- (setq coll (ivy--buffer-list "" ivy-use-virtual-buffers)))
+ (setq coll (ivy--buffer-list "" ivy-use-virtual-buffers predicate)))
(dynamic-collection
(setq coll (funcall collection ivy-text)))
((or (functionp collection)
(dynamic-collection
(setq coll (funcall collection ivy-text)))
((or (functionp collection)
"List of regexps or functions matching buffer names to ignore."
:type '(repeat (choice regexp function)))
"List of regexps or functions matching buffer names to ignore."
:type '(repeat (choice regexp function)))
-(defun ivy--buffer-list (str &optional virtual)
+(defun ivy--buffer-list (str &optional virtual predicate)
"Return the buffers that match STR.
When VIRTUAL is non-nil, add virtual buffers."
(delete-dups
"Return the buffers that match STR.
When VIRTUAL is non-nil, add virtual buffers."
(delete-dups
(abbreviate-file-name default-directory)))
(propertize x 'face 'ivy-remote)
x))
(abbreviate-file-name default-directory)))
(propertize x 'face 'ivy-remote)
x))
- (all-completions str 'internal-complete-buffer))
+ (all-completions str 'internal-complete-buffer predicate))
(and virtual
(ivy--virtual-buffers)))))
(and virtual
(ivy--virtual-buffers)))))