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

hook called when the current perspective changes #212

Open
danlipsa opened this issue Nov 19, 2024 · 2 comments
Open

hook called when the current perspective changes #212

danlipsa opened this issue Nov 19, 2024 · 2 comments

Comments

@danlipsa
Copy link

I use perspective because I often work on projects that use several repositories. Thanks for working on it!

It would be great to be able to save different bookmarks for different perspectives, and switch the set of bookmarks when the perspective changes.

That could be achieved if perspective calls a hook every time the user changes the current perspective like this (using pseudo-code):

perspective_changed(string current_persp, string prev_persp).

Users could use this to:

  • save the bookmarks for prev_persp
  • change the file where bookmarks are read from based on the current_perp
  • load the new bookmarks

Thoughts?

@danlipsa danlipsa changed the title hook called when perspective change hook called when the current perspective changes Nov 19, 2024
@gcv
Copy link
Collaborator

gcv commented Nov 19, 2024

That already exists, see persp-before-switch-hook and persp-switch-hook. They should be usable with normal Elisp hook-setting mechanisms.

@danlipsa
Copy link
Author

Great! Thank you!

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

No branches or pull requests

2 participants