treemacs icon indicating copy to clipboard operation
treemacs copied to clipboard

Setting the default workspace

Open Schievel1 opened this issue 3 years ago • 4 comments

When I delete everything in treemacs-edit-workspaces except for one workspace, I close Emacs then restart it, it adds to more workspaces, one called "No Perspective" with a project which is my $home and one called "Perspective 1" with a project that is the emacs binary folder. Whenever I restart Emacs it adds those back again and it also selects the "Perspective 1".

I don't really care that much about those extra workspaces, if I could just make it so that it starts up with a default workspace I choose. I tried treemacs-set-fallback-workspace on the workspace I want as default already, but that wont do the trick.

I am running emacs-28.1 on windows 10.

Schievel1 avatar Jul 21 '22 06:07 Schievel1

Same issue here, same version of Emacs (28.1) on Arch Linux. A new workspace is added called "No Tabs" with my $HOME directory as workspace, and it uses it as default, instead of the real default. Treemacs v2.10.

Xalares avatar Aug 22 '22 10:08 Xalares

I don't know how I did it but somehow this got resolved by itself for now. Maybe it's because I now shutdown emacs with save-buffers-kill-terminal (SPC q q in Doom) instead of just shutting down my PC I also have the problem that doom emacs doesn't save my recent files sometimes. But I don't know if thats related.

Treemacs 2.9.5 btw.

Schievel1 avatar Aug 22 '22 12:08 Schievel1

one called "No Perspective" with a project which is my $home and one called "Perspective 1" with a project that is the emacs binary folder.

Treemacs creates workspaces like that when install treemacs-persp and tell it to use perspectives as the scope for your buffers. This feature needs to be explicitly enabled, somewhere in your config there's a line that looks like this: (treemacs-set-scope-type 'Perspectives). Just remove that part and treemacs should go back to behaving as you want it to.

Alexander-Miller avatar Aug 22 '22 19:08 Alexander-Miller

I tried with M-x describe-variable and that variable does not seem to exist

Edit: I also searched my whole home directory with ripgrep for that variable. It does not return any results. I installed my emacs in my home directory and have every config directory (.doom.d, .emas.d) there.

/ Sorry, I did not recognize this is a function. Indeed this is set by doom when :ui workspaces is set in init.el.

Schievel1 avatar Aug 23 '22 06:08 Schievel1

This issue has been automatically marked as stale because it has not had recent activity.

stale[bot] avatar Oct 23 '22 12:10 stale[bot]