syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.68k stars 4.89k forks source link

Buffer -> Window assignments lost after closing frame when using Emacs daemon #13811

Closed mmeier86 closed 5 months ago

mmeier86 commented 4 years ago

Description :octocat:

I'm using emacs in daemon mode, also storing my layout and automatically loading it on emacs startup.

Now, lets say I create a new layout and open .emacs.d/README.md in it. Then, I quit the frame with <SPC> q f. The emacs server stays running.

Now, I start a new frame with emacsclient -c. My newly created layout is still there, as expected. But if I now switch to that new layout, I don't have the .emacs.d/README.md buffer open, but instead I see the scratch buffer opened in the layout's only window. Pressing <SPC> b b actually shows me that the buffer is still open, but it's not loaded into the window.

Conversely, if I kill the server too, by pressing <SPC> q q instead of just killing the frame with <SPC> q f, the buffer with README.md is still open in the layout's window, as expected.

TLDR: It seems to me that while the layout, open buffer lists and so on are stored, the info which buffer is open in which window isn't.

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart: The information about which buffer is loaded in which window is not stored between frames.

Expected behaviour: :heart: :smile: When I close the last frame/emacsclient and open a new one, the previously loaded buffers are still shown in the windows they were in when I closed the previous buffer.

System Info :computer:

Possibly relevant info

I have dotspacemacs-auto-resume-layouts 't set in my .spacemacs config.

duianto commented 4 years ago

Confirmed.

A layouts buffers seem to be saved if one switches layout before killing the frame.

Windows 10, System Info (Click to expand)
#### System Info :computer:
- OS: windows-nt
- Emacs: 27.1
- Spacemacs: 0.300.0
- Spacemacs branch: develop (rev. 7a7b04abb)
- Graphic display: t
- Distribution: spacemacs
- Editing style: vim
- Completion: helm
- Layers:
```elisp
(autohotkey command-log emacs-lisp git haskell helm
            (javascript :variables javascript-backend 'lsp)
            lsp multiple-cursors org
            (python :variables python-backend 'lsp python-lsp-server 'mspyls)
            shell version-control treemacs)
```
- System configuration features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2 HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER LCMS2 GMP

github-actions[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!