Skip to content
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

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

Closed
mmeier86 opened this issue Aug 2, 2020 · 2 comments
Closed

Comments

@mmeier86
Copy link

mmeier86 commented Aug 2, 2020

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 🪲

  • Start Emacs in daemon mode
  • Launch a new frame with emacsclient -c
  • Create a new layout via <SPC> l 2
  • Open a file in that layout <SPC> f f
  • Close the frame with <SPC> q f
  • Open another frame with emacsclient -c
  • Switch to the previously created layout <SPC> l 2
  • Observe that the previously loaded buffer is not
    in the window anymore
  • Press <SPC> b b to observe the buffer is still opened

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

Expected behaviour: ❤️ 😄
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 💻

  • OS: gnu/linux
  • Emacs: 27.0.91
  • Spacemacs: 0.300.0
  • Spacemacs branch: develop (rev. 7a9a16e)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(helm lsp
      (auto-completion :variables auto-completion-enable-help-tooltip t)
      (c-c++ :variables c-c++-default-mode-for-headers 'c++-mode c-c++-backend 'lsp-ccls c-c++-lsp-enable-semantic-highlight t c-c++-adopt-subprojects t)
      cmake elixir
      (haskell :variables haskell-completion-backend 'lsp)
      emacs-lisp
      (git :variables git-commit-summary-max-length 50)
      (latex :variables latex-build-command "LatexMk")
      (markdown :variables markdown-command "~/.local/bin/pandoc")
      (plantuml :variables plantuml-jar-path "/home/michael/.local/opt/plantuml.jar")
      (python :variables python-backend 'anaconda)
      (semantic)
      (shell-scripts)
      (spacemacs-layouts :variables persp-autokill-buffer-on-remove 'kill-weak)
      (syntax-checking)
      (treemacs)
      (org :variables org-plantuml-jar-path "/home/michael/.local/opt/plantuml.jar")
      yaml)
  • System configuration features: XAW3D XPM JPEG GIF PNG RSVG CAIRO IMAGEMAGICK DBUS GCONF GLIB NOTIFY INOTIFY ACL GNUTLS FREETYPE ZLIB LUCID X11 XDBE XIM THREADS PDUMPER GMP

Possibly relevant info

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

@duianto
Copy link
Collaborator

duianto commented Sep 12, 2020

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 github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Sep 12, 2021
@lebensterben lebensterben added Help wanted and removed stale marked as a stale issue/pr (usually by a bot) labels Sep 12, 2021
@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Sep 12, 2022
Repository owner deleted a comment from github-actions bot Sep 12, 2022
Repository owner deleted a comment from github-actions bot Sep 12, 2022
@lebensterben lebensterben removed the stale marked as a stale issue/pr (usually by a bot) label Sep 12, 2022
Copy link

github-actions bot commented Feb 1, 2024

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!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 1, 2024
@github-actions github-actions bot closed this as completed May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants