Skip to content

Conversation

@blahgeek
Copy link
Contributor

Previously, after switching to a perspective, the recent-visit order of buffers will be changed because persp-reactive-buffers revisits buffers based on persp-current-buffers which is in a fixed order. With this PR, persp-reactive-buffers revisits the buffers based on (buffer-list)

Previously, after switching to a perspective, the recent-visit order
of buffers will be changed because `persp-reactive-buffers` revisits
buffers based on `persp-current-buffers` which is in a fixed order.
With this PR, `persp-reactive-buffers` revisits the buffers based on `(buffer-list)`
Copy link
Collaborator

@gcv gcv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but please consider the buffer-live-p check I noted in the comment.

perspective.el Outdated
when (buffer-live-p buf)
collect buf into living-buffers
(cl-loop for buf in (reverse (buffer-list))
when (member buf buffers)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep the check for buffer-live-p here ((and (buffer-live-p buf) (member buf buffers)) or something like it). It might be overkill, but Perspective had a lot of "dead buffer" bugs over the years and I'd rather be more cautious.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Updated.

@gcv gcv merged commit 0fc37c4 into nex3:master Feb 15, 2025
8 checks passed
@gcv
Copy link
Collaborator

gcv commented Feb 15, 2025

Merged. Thank you for contributing to Perspective!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants