New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ivy-ignore-buffers: question about behaviour #477

Closed
manuel-uberti opened this Issue Apr 18, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@manuel-uberti
Contributor

manuel-uberti commented Apr 18, 2016

Hi,

I set this in my setup:

(setq ivy-ignore-buffers '("company-statistics-cache.el"))

From what I understood in this page, it should be the right regexp to refer to company-statistics-cache.el alone.

When I call ivy-switch-buffer now I'm not seeing company-statistics-cache.el in the list of buffers, which is what I am expecting.

However, if I type compa, company-statistics-cache.el appears:

2016-04-18-083904_867x211_scrot

Is this the expected behaviour?

@abo-abo

This comment has been minimized.

Show comment
Hide comment
@abo-abo

abo-abo Apr 18, 2016

Owner

Is this the expected behaviour?

It is the programmed behavior. I'm not sure if I programmed it, but it makes some sense: if no buffer at all matches the current input, when taking ivy-ignore-buffers into account, ivy will try again with ivy-ignore-buffers disabled.

If it's not OK with you, propose a different behavior. For instance setting ivy-use-ignore to 'always could display 0 buffers, even if some buffers on ivy-ignore-buffers match.

Owner

abo-abo commented Apr 18, 2016

Is this the expected behaviour?

It is the programmed behavior. I'm not sure if I programmed it, but it makes some sense: if no buffer at all matches the current input, when taking ivy-ignore-buffers into account, ivy will try again with ivy-ignore-buffers disabled.

If it's not OK with you, propose a different behavior. For instance setting ivy-use-ignore to 'always could display 0 buffers, even if some buffers on ivy-ignore-buffers match.

@manuel-uberti

This comment has been minimized.

Show comment
Hide comment
@manuel-uberti

manuel-uberti Apr 18, 2016

Contributor

I see, thanks for the explanation. Actually, I guess your example with 'always would be the best solution (for my use case, anyway).

But if the current behaviour makes sense, leave it as it is. I don't want to make things more complicated.

Contributor

manuel-uberti commented Apr 18, 2016

I see, thanks for the explanation. Actually, I guess your example with 'always would be the best solution (for my use case, anyway).

But if the current behaviour makes sense, leave it as it is. I don't want to make things more complicated.

abo-abo added a commit that referenced this issue Apr 18, 2016

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
@abo-abo

This comment has been minimized.

Show comment
Hide comment
@abo-abo

abo-abo Apr 18, 2016

Owner

Have a look, you should now be able to do what you described.

Owner

abo-abo commented Apr 18, 2016

Have a look, you should now be able to do what you described.

manuel-uberti pushed a commit to manuel-uberti/.emacs.d that referenced this issue Apr 18, 2016

Manuel Uberti
Set ivy-use-ignore-default
Setting it to 'always forces Ivy to ignore buffers speficied in
ivy-ignore-buffers always.

See: abo-abo/swiper#477
@manuel-uberti

This comment has been minimized.

Show comment
Hide comment
@manuel-uberti

manuel-uberti Apr 18, 2016

Contributor

You're too kind and quick, thank you. It works!

Contributor

manuel-uberti commented Apr 18, 2016

You're too kind and quick, thank you. It works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment