-
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
Perspectives lost after last frame is closed when running in daemon mode #41
Comments
I like option one. In general, I think it's confusing if perspective data persists invisibly beyond the frame that owns them, but users who use daemonized instances a lot should have a way to persist perspectives. I'd be open to merging in @Bad-ptr's implementation. |
@IvanMalison, I am currently using #42 which implements solution 2 - transfering the workspaces of a frame when it is closed. I am personally happy with this solution. @nex3, would you be open to merge the open pull request? I think it doesn't have drawbacks compared to the existing behavior:
|
I would like to have an option to share perspectives among all frames, as described in option one. |
👍 |
@che2 I've done a review of your PR. |
For those who interested: https://gist.github.com/Bad-ptr/aa6be231fdc22705ca19 This is my attempt to solve these issues, as I see it. My idea is to introduce How to use: load the perspective.el Anyone want to test it? // Hm.. found a bug -- "Marker does not point anywhere" error, after loading from file. Strange. |
As someone who uses the daemon almost exclusively, having perspectives tied to the daemon as an option vs the frame that spawned them would be immensely helpful. I could be working from my desktop, then grab my laptop to change the scenery and then pick up and run with the same workflow/perspectives. I was doing this already before perspective, but we all know that's less desirable after rocking perspective. |
I bet this will be way easier to get working if I ever get around to merging in #91. As a workaround, you can save the perspectives to a file using |
@gcv - I have tried getting |
The problem might be that it's designed to save and restore full Emacs state, meaning multiple frames. Whereas your use case is (IIUC) mainly about one frame. It would take some refactoring to extract a single-frame use case. I don't have time to work on it right now. If you know Elisp, I'd be glad to look at a PR. |
By default, perspectives are not shared between frames. To import a perspective to another frame, the 'persp-import' command can be used. This works as expected as long as the frame from which perspectives are improted is still open, but once that frame is closed, the perspectives belonging to the frame are lost forever, and the only way to recover the buffers from those lost frames are to either:
o use 'persp-add-buffer' to add each buffer manually
o shut down persp-mode
This is not ideal, especially in daemon mode, where the last frame would frequently be closed logging out of an ssh session, but perspectives are gone when a new frame is created in the same emacs daemon after logging back in.
I suggest that either:
Option 1 is probably the simplist to implement (it's already done by persp-mode), and also a good work around to the problem. Option 2 is arguably more sane, as it fixes the (broken) behavior.
The text was updated successfully, but these errors were encountered: