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

mentions switch-to-prev-buffer-skip customization in Readme #211

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ please refer to it for release notes.
- [Compatibility](#compatibility)
- [Installation](#installation)
- [Usage](#usage)
- [Buffer Switchers](#buffer-switchers)
- [Buffer Switching](#buffer-switching)
- [Notes on `completing-read` Enhancements](#notes-on-completing-read-enhancements)
- [Saving Sessions to Disk](#saving-sessions-to-disk)
- [Customization](#customization)
Expand Down Expand Up @@ -240,10 +240,19 @@ The actual command keys (the ones pressed after the prefix) are defined in
- `C-l` — `persp-state-load`: Load all perspectives from a file


### Buffer Switchers
### Buffer Switching

Since Perspective maintains distinct buffer lists for each perspective, it helps
to use a Perspective-aware buffer switcher.
to use Perspective-aware methods for buffer switching.

Since Emacs 27.1, the commands `previous-buffer` and `next-buffer` can be made
Perspective-aware using the `switch-to-prev-buffer-skip` variable as follows:

```elisp
(setq switch-to-prev-buffer-skip
(lambda (win buff bury-or-kill)
(not (persp-is-current-buffer buff))))
```

When using one of the following buffer switchers, you will only be prompted for
buffers in the current perspective and the frame-specific "global" shared
Expand Down
Loading