Fix uninitialized frame crashes#104
Fix uninitialized frame crashes#104zenspider merged 3 commits intonex3:masterfrom gcv:fix-uninitialized-frame-crashes
Conversation
These occur when persp-mode is active, but a frame is created with after-make-frame-functions bypassed (i.e., let-bound to nil), resulting in frames without frame parameters which persp-mode expects. Since most of these errors occur in unguarded use of perspectives-hash, persp-curr, and persp-last, this workaround tries to return reasonable but empty values from these functions instead of nil.
|
Can you 'splain how you get this to occur? I don't hit this ever. |
|
Start from a fresh Emacs instance. Make sure you don't have this patch or #86 loaded. Evaluate: This pops open a new frame. Perspective is not enabled in this frame, and will break if you attempt to use it. This is expected behavior (although far from ideal), as Unfortunately, this also breaks perspective in the original frame in which all frame parameters are properly loaded. Keep the new frame open, go back to the original frame, make a new perspective, and then attempt to kill that new perspective. You'll get This matters because posframe does exactly this when creating its frames. posframe-dependent packages create hidden frames, none of which have the necessary frame parameter initialization. Most notably, this breaks ivy-posframe. To add insult to injury, this is not debuggable with I wrote a test, but I can't get it to work properly in terminal mode Emacs: calling This PR is an alternative to #86, which — as you noted — is a much more invasive approach to solving this problem. (It also complements the overall cleanup of frame parameter use in #91, which I haven't had time to test.) |
|
@zenspider: Any thoughts on this? |
|
no thoughts. just merged. :P |
No description provided.