persp-reactive-buffers: preserve recent visited order of buffers#215
Merged
gcv merged 2 commits intonex3:masterfrom Feb 15, 2025
Merged
persp-reactive-buffers: preserve recent visited order of buffers#215gcv merged 2 commits intonex3:masterfrom
gcv merged 2 commits intonex3:masterfrom
Conversation
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)`
gcv
requested changes
Feb 11, 2025
Collaborator
gcv
left a comment
There was a problem hiding this comment.
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) |
Collaborator
There was a problem hiding this comment.
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.
Collaborator
|
Merged. Thank you for contributing to Perspective! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Previously, after switching to a perspective, the recent-visit order of buffers will be changed because
persp-reactive-buffersrevisits buffers based onpersp-current-bufferswhich is in a fixed order. With this PR,persp-reactive-buffersrevisits the buffers based on(buffer-list)