-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
emacsclient --tty crashes immediately (regression) #5978
Comments
persp-mode has renamed persp-activated-hook to persp-activated-functions, so we gotta update the hook.
If this line is commented out:
@syl20bnr @TheBB could I propose that this particular scenario ( |
Probably prudent to ping @bmag on this one. |
@aaronjensen The bug also reproduces on my machine (Ubuntu 16.04). emacsclient starts and crashes immediately, leaving my terminal in a weird state, but I don't see any error message. The BugI don't know why it happens, but I suspect it has something to do with persp-mode using the same nil-perspective for all(?) frames. Because persp-mode uses the same perspective for the terminal frame as for the graphical frame, we try to load a graphical window state (Eyebrowse workspaces are mainly a window state object) into a terminal frame, resulting in error. There is indeed an error if I manually load a graphical window state into a terminal frame, even in stock Emacs. To sum it up: we can't use the same workspace on different frame types (graphical vs. terminal), but because the same perspectives are used in both frame types, and because we make workspaces perspective-local, the result is that we try to do exactly that. Specifically in @aaronjensen's case, the shared perspective is probably the default perspective. Possible Solution 1Make perspective local to a frame, IOW perspectives should not be shared between frames. I don't know if this is possible, and it will certainly make it harder for users who want to share perspectives between frames. Possible Solution 2Store two sets of workspaces as perspective parameters - one set for graphical frames, a second set for terminal frames. When loading workspace from perspective, load the correct one according to (persp-parameter 'eyebrowse-window-configs))
(persp-parameter 'eyebrowse-current-slot))
(persp-parameter 'eyebrowse-last-slot)) will be replaced by: ;; for graphical frames
(persp-parameter 'gui-eyebrowse-window-configs))
(persp-parameter 'gui-eyebrowse-current-slot))
(persp-parameter 'gui-eyebrowse-last-slot))
;; for terminal frames
(persp-parameter 'term-eyebrowse-window-configs))
(persp-parameter 'term-eyebrowse-current-slot))
(persp-parameter 'term-eyebrowse-last-slot)) I think solution 2 is simpler and easier to implement/maintain than the other possible solutions. Possible Solution 3Same as solution 2, but instead of using just two sets, we use a distinct set for each frame (graphical or not). |
@aaronjensen can you test #6031? Terminal frames and graphical frames should have totally separate workspaces (but not separate layouts). |
@bmag that works great, thank you! |
Fixed with released of Spacemacs v0.200. Let us know if you still have any problems with this issue. |
Description
I can no longer connect tty clients to a graphical emacs on osx. I bisected, and
this is the offending commit:
cf3068e
Because of its nature (it is simply re-enabling a hook that was disabled by an
upstream change), reverting the commit is probably not the right thing to do.
Reproduction guide
emacsclient --tty something
Observed behaviour:
emacsclient starts and crashes immediately
This error appears in messages:
Expected behaviour:
emacsclient does not crash
System Info
The text was updated successfully, but these errors were encountered: