Skip to content

Commit

Permalink
Merge pull request #211 from titibandit/next-prev
Browse files Browse the repository at this point in the history
mentions `switch-to-prev-buffer-skip` customization in Readme
  • Loading branch information
gcv authored Oct 30, 2024
2 parents f50eb57 + aba84dd commit 2647fcf
Showing 1 changed file with 12 additions and 3 deletions.
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

0 comments on commit 2647fcf

Please sign in to comment.