Skip to content
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

evil-alternate-buffer doesn't respect frame parameter buffer-predicate #680

Open
TheBB opened this issue Jun 24, 2016 · 0 comments
Open

Comments

@TheBB
Copy link
Member

TheBB commented Jun 24, 2016

Originally reported by: bmag (Bitbucket: bmag, GitHub: bmag)


buffer-predicate is a frame parameter that filters out "uninteresting" buffers for functions such as next-buffer and other-buffer. However, evil-alternate-buffer doesn't use this predicate to filter out possible alternate buffers. I am not sure if it is a bug or the intended behavior.

I've found this issue while trying to solve a Spacemacs issue. We can solve (the evil-related part of) the issue on our side, but I'm reporting in case you decide it's a bug in evil-alternate-buffer.

Reproduction guide:

  • Start emacs and enable evil-mode
  • Evaluate this code:
#!elisp

(defun next-buffer-p (buffer)
  (string-prefix-p  "test" (buffer-name buffer)))
(set-frame-parameter nil 'buffer-predicate 'next-buffer-p)
  • Create buffer "test1" (e.g. with C-x b)
  • Create buffer "blah"
  • Create buffer "test2"
  • Call evil-alternate-buffer (e.g. with M-:)

Observed behavior:

evil-alternate-buffer returns buffer "blah" (and two markers in that buffer)

Expected behavior:

evil-alternate-buffer should return buffer "test1"?

Emacs version: 24.5.1
Evil version: evil-git-1b77fd8
Operating system: Ubuntu 16.04


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

No branches or pull requests

1 participant