You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey,
I have one of my perspective, that is filled with tramp buffers over ssh.
I have it in my init.el that perspectives are automatically loaded on start.
This leads to two problems:
If my ssh server happens to be offline, loading the buffers times out and this destroys all my perspectives.
If my ssh server is online, perspectives load fine, but it takes a looooong time, even if I don't intend to work on these tramp buffers.
Would there be a way to defer the loading of the perspective until we actually switch to that perspective? That would actually speed up the loading of the perspectives, even if one doesn't have many tramp buffers.
Or if there is another solution to my problem, I'm all ears :)
Cheers,
The text was updated successfully, but these errors were encountered:
Good idea! I don't have time to work on it myself right now, but would gladly review a patch.
The approach is something like this:
Introduce a new (defcustom persp-state-defer-loading nil ...).
Introduce a new data structure to keep track of loaded and deferred perspectives. It should be a map of frame -> perspective -> (loaded flag, list of files).
Refactor persp-state-load to call helper functions which do the work of actually opening files depending on the value of persp-state-defer-loading.
Refactor persp-switch. If persp-state-defer-loading is t, it should check the new data structure: if it has not yet been loaded, mark it as loaded and call the new helper functions to load the files.
Thanks @gcv for the "implementation tutorial"!
I'm also struggling with time at the moment (hence why I want my emacs to load faster!) and I'm not the best elisp programmer yet, I'll try to give a go at implementing that, later down the line.
Hey,
I have one of my perspective, that is filled with tramp buffers over ssh.
I have it in my init.el that perspectives are automatically loaded on start.
This leads to two problems:
Would there be a way to defer the loading of the perspective until we actually switch to that perspective? That would actually speed up the loading of the perspectives, even if one doesn't have many tramp buffers.
Or if there is another solution to my problem, I'm all ears :)
Cheers,
The text was updated successfully, but these errors were encountered: