-
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
Generalizes sorting of perspectives and adds sort-by-creation-time. #87
Conversation
This is valuable to me because I often use perspectives during yak shaves and other multi-project tasks where I need to "push" and "pop" things to work on. By sorting by persp-time-created, this simulates that perfectly: + While working on a task, find a tangent I need to go off on. + Create a new perspective. + Work on tangent. Possibly going back and forth between multiple perspectives. + When done with tangent, kill the perspective, going back to next-most-recent. This switches from `persp-sort-chronologically` (bool) to `persp-sort` (symbol). There might be some smoother way to honor the old value and auto-convert to the new variable, but I don't know how. This also adds `created-time` to the perspective struct. Loading this code in your current emacs breaks everything. I don't know if it is possible to migrate existing structs or otherwise patch this code to work with old structs. Restarting emacs seems fine but I'm open to suggestion.
I'm not thrilled with the way The gist: Let's say you're using this mode to do a yak shave and you have several perspectives pushed on the stack. You finish up some of them and start to kill the perspectives. The first time, it uses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice. I updated #80 to respect perspective order on save and restore.
I'm not too concerned about breaking existing Emacs sessions when this update loads. Elisp doesn't support update-instance-for-redefined-class, so there isn't much we can reasonably do.
In the future, we can just recommend that people use persp-state-save before upgrading perspective-el.
does that have some sort of migration strategy or is it just flexible enough that it just fills in the blanks for fields that aren't there? |
Merging... Actually... no. I prefer rebase merges. I'll start a dialog in our #92 discussion. |
fuck it. 😛 |
This is valuable to me because I often use perspectives during yak
shaves and other multi-project tasks where I need to "push" and "pop"
things to work on. By sorting by persp-time-created, this simulates
that perfectly:
This switches from
persp-sort-chronologically
(bool) topersp-sort
(symbol). There might be some smoother way to honor theold value and auto-convert to the new variable, but I don't know how.
This also adds
created-time
to the perspective struct. Loading thiscode in your current emacs breaks everything. I don't know if it is
possible to migrate existing structs or otherwise patch this code to
work with old structs. Restarting emacs seems fine but I'm open to
suggestion.