Set buffer-predicate to spacemacs/useful-buffer-p #6574
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prevents
next-buffer
,other-buffer
, etc. from choosing useless buffers.No need for
spacemacs/next-useful-buffer
,spacemacs/previous-useful-buffer
anymore, so I replaced their bindings withnext-buffer
andprevious-buffer
.Fixes
spacemacs/alternate-buffer
to respectbuffer-predicate
. It no longer usesevil-alternate-buffer
.When spacemacs-layouts is used, buffer-predicate filters useful buffer that belong to the current layout. For example,
SPC b n
will not show useless buffers or buffers that don't belong to the current layout.Caveats:
spacemacs/alternate-buffer
shows buffer from current layout, so it is effected bypersp-mode
not adding certain buffers to current layout. See spacemac-layouts: In non default layouts popping buffers is behaving wrong #4956, Spacemacs-layouts - Special buffers are not added to the current layout #5776.SPC TAB
can show a buffer from the previous layout.Fixes #6159 as much as is reasonably possible.