Skip to content

Treemacs loses state and persists it #1180

@knkski

Description

@knkski

It loses most state, except for the current project, and then persists the bad state.

Steps to reproduce:

  1. Configure Treemacs to your liking. I have several different projects that I've added
  2. Press SPC h r r to run doom/reload
  3. Treemacs has disappeared, that's fine I'll open it back up
  4. Open it back up to see that everything was lost, except for the currently-open project
  5. Quit Emacs to see if it was just weird state
  6. Reopen Emacs and find that it did lose everything
  7. Check persist file to confirm

I was also just able to reproduce by having multiple windows open and switching between them:

  1. Have Treemacs open and one window selected
  2. Close Treemacs (+treemacs/toggle)
  3. Move to other window
  4. Open Treemacs back up (+treemacs/toggle)
  5. See that the single project shown is for the new window and not the old one
  6. If I quit Emacs, that state will be persisted

Here's a simple example config of what I usually work with:

* Perspective main
** foo
 - path :: ~/foo
** bar
 - path :: ~/bar
** baz
 - path :: ~/baz

Here's a common result of what I'm left with, e.g. after editing one of the Doom config files and running doom/reload

* Perspective main
** doom
 - path :: ~/.config/doom

And this is what I was getting when switching between windows (this or the plain doom one above):

* Perspective main
** foo
 - path :: ~/foo

This is with Treemacs 3.2 + Doom + Emacs 30.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions