nex3 / perspective-el

Perspectives for Emacs.
MIT License
880 stars 71 forks source link

Perspective.el wipes out perspectives when a emacsclient frame is closed. #194

Open graven04 opened 1 year ago

graven04 commented 1 year ago

The backdrop

When using emacs in daemon mode if you open a emacsclient frame and open a file and delete frame without killing buffer then next emacsclient frame you open will have that buffer in it. This is the behaviour of emacs daemon. I heavily rely on this behaviour for emacs workflow.

The problem

After learning about perspective.el I thought it will help my workflow terendously and tried it out. It works well in most respects except one case i have come upon which i will make a separate issue about. The problem is when i open emacsclient for the first time and create some perspectives and open some files and then close the frame to open a new one, all the files and perspective are gone. Now this may be useful when you are not using emacs in daemon mode but it kill the purpose of daemon mode when this behavior happens.

The solution?

i am not sure why perspective.el behaves like this when using emacs in daemon mode. I see how that behavior is useful when opening many non emacsclient frames so maybe perspective.el should not kill all perspectives when emacs in running in daemon mode. If this is not possible to do could I at least have some hack-able solution.

graven04 commented 1 year ago

Actually this seems to have been talked about in some open issues. I normally check both closed and open issues for my own issues before opening one but i seem to have forgotten check the open ones. I will not close this straight away as i am still interested in the future of this issue/enhancement and wish to know when it may be implemented or if there is some temporary solution to this as my own temporary solution have not worked.

gcv commented 1 year ago

Daemon mode is poorly supported in Perspective because perspectives are tracked inside frame(-specific) parameters. Refactoring this a long-term goal of the project. See #41, #91, and #186.