localauthor / org-side-tree

Navigate Org-mode outlines in Emacs via side window
GNU General Public License v3.0
40 stars 4 forks source link

Add options to enable/disable fixed size and to set a fixed size for org-side-tree like treemacs #14

Closed IceAsteroid closed 6 months ago

IceAsteroid commented 6 months ago

Hello, late for Merry Christmas!

See this issue post of treemacs https://github.com/Alexander-Miller/treemacs/issues/748

When resizing for windows, a sidebar should reasonably be fixed in its size, not following to resize by commands like (balance-windows)

The user can choose whether to enable or disable to have the sidebar fixed in size, and to set the value for its default size.

localauthor commented 6 months ago

See if the latest commit does what you're looking for. Set the variable org-side-tree-width to an integer. You'll have to close and reopen the side-tree window to see the change.

I see that treemacs has a lot of functions to assist with changing width, and toggling, etc. Maybe someone will want those, but the one variable seems enough for the moment. Let me know what you think.

IceAsteroid commented 6 months ago

It works nicely. One thing to be cautious is the variable must be set at the very beginning in the :init keyword of use-package section for org-side-tree, otherwise it sometimes won't size the sidebar window at all.

I'm gonna keep testing it out, and see if it fits occasions well.

Thank you!

https://github.com/localauthor/org-side-tree/assets/90975914/d18d008f-a2d9-469f-8f08-81f34f770164

So good :)

Edit: It's working fine