-
Notifications
You must be signed in to change notification settings - Fork 71
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
Feature Request: Perspective-specific next/prev buffer switch #63
Comments
I use these functions to achieve the same behaviour you are asking for:
|
@inigoserna |
IMO it's a personal customization, not something everyone could be interested in. |
But it's useful to have, isn't it? |
Well, I use it daily ;) |
@inigoserna I mean, it's useful, so there's worth to send a PR with this feature, isn't it? |
Looking for something like this myself, and the functions above seem to not be compatible with current versions of perspective. I'm getting |
A few thoughts on this. To address @tonycpsu's comment about @inigoserna's code not working with current Perspective. You can fix it by changing However, I don't think that code really does the right thing with regard to going to the "next" or "previous" buffer. Since it sorts buffers alphabetically, it actually goes to the next or previous buffer in alphabetical order, not in chronological last-viewed order as the Emacs built-in Writing an implementation of I recently added Perspective-aware implementations of several buffer switchers, in addition to the Ido support which has been available for a long time. See the updated README for details. Would those work instead of a mechanism for iterating through all of a perspective's buffers in a given window? |
Closing this unless someone convinces me that Perspective-aware buffer switchers are inadequate, and that there's a reasonably simple implementation path. |
fix from nex3/perspective-el#63 does not work correctly, it switches by alphabetical sort and not chronologically
I don't know if this is right, as this seems almost too easy, but I think I've achieved the desired behaviour using
basically just forbidding the [previous|next]-buffer functions to switch to buffers that are not part of the current perspective. Doing this preserves the chronological order of last viewed buffers. |
@titibandit Yeah, if I know correctly, it is introduced 27.1 or so, which comes after this issue. But anyway, thank you for providing the snippet! |
Very nice! Thank you @titibandit. I’m open to automatically setting |
Oh I thought since this is a user setting, it should be, from the perspective (pun not intended) of this package, left alone and only hinted at in the Readme. But it's true that this behavior makes just so much more sense. Having it set automatically by |
At least I know, perspective doesn't have features that is like
switch-to-next-buffer
orswitch-to-prev-buffer
using specific perspective.In detail, there is no simple way to change
C-x <C-left>
(switch-to-prev-buffer
) to perspective-relative one.For example, suppose that I have 2 perspective
perspA
andperspB
, and there are 5 buffers inperspA
, and there are 7 buffers inperspB
. In this case, I can't traverse my buffers only which are inperspA
, and while traversing, all buffers ofperspB
will join toperspA
and everything is messed up.Could you add these features(next/prev) to this wonderful package?
The text was updated successfully, but these errors were encountered: