πŸ’Ύ Archived View for tilde.team β€Ί ~contrapunctus β€Ί gemlog β€Ί emacs-sidebars.gmi captured on 2024-06-16 at 13:20:47. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-03)

-=-=-=-=-=-=-

↩ gemlog

β†’ Next: Keyboard machinations with Kmonad

← Previous: A Life-Changing Keyboard Tweak

Emacs Sidebars

(2021-07-10T05:11:07+0530)

So I wanted an overview of definitions in the current buffer, and set about evaluating the options I was suggested.

speedbar

What I like -

βœ”οΈ Displays files and definitions in each file.

βœ”οΈ Hides package prefixes in Elisp code

βœ”οΈ Automatically displays outline of buffer in current window (i.e. follows the current window)

What I don't -

❌ Makes a new frame instead of a side window.

❌ Very dated-looking icons

wgreenhouse: yeah, it's very late-90s Visual Studio

sr-speedbar

What I like -

βœ”οΈ Makes a side window

βœ”οΈ Displays files and definitions in each file.

βœ”οΈ Automatically displays outline of buffer in current window (i.e. follows the current window)

βœ”οΈ [Elisp buffers] Hides package prefixes in outline

What I don't -

❌ MELPA's version is from 2016 (!!!); has some bugs, e.g. error when running `sr-speedbar`, and erroneous code to detect if it is active (haven't tested with `emacs -q`, although I'm not sure that will affect it)

❌ Very dated-looking icons, same as `speedbar`

Other characteristics -

1. identical to `speedbar` in almost all aspects

treemacs

daleβ€Ž: treemacs is probably closer to the Sublime experience. Let me know if you figure out how to... use it.
daleβ€Ž: I have it. I turn it on sometimes. Files get displayed, it looks pretty. Things usually go downhill from there.
dale: I don't know why everyone wants to have "roots" and "projects". It's irritating.

What I like -

βœ”οΈ Makes a side window

βœ”οΈ Pretty, modern-looking icons

What I don't -

❌ [Elisp buffers] Does not hide package prefixes

❌ Following the current window is...complicated.

* `treemacs-follow-mode` follows the file visited by the current _buffer_, but I want Treemacs to display the files in the directory of the current _window_!

* `treemacs-tag-follow-mode` automatically displays tags of the open file, but only if it's in a subdirectory of the path of the "default workspace"

* I made a comment about this to bring it to the attention of the author.

https://github.com/Alexander-Miller/treemacs/issues/489#issuecomment-876696131

Other characteristics -

1. Default left-click action is to place point on an item. This can be changed with e.g. -

(use-package treemacs
  :bind (:map treemacs-mode-map
  ([mouse-1] . #'treemacs-single-click-expand-action)))

imenu-list

What I like -

βœ”οΈ Makes a window

βœ”οΈ Highlights items to indicate where you are in the buffer

βœ”οΈ Automatically displays outline of buffer in current window (i.e. follows the current window)

βœ”οΈ Does not use icons at all. I find this more Emacs-y, like Dired.

βœ”οΈ Nice colors - gives you an indication of heading depth in Org buffers (although it's different from the heading colors of the Org buffer itself)

What I don't -

❌ Window is not a "Side Window", in Emacs terminology - it can be removed via `delete-other-windows`.

- dale pointed out this hack to make `imenu-list` run in a side window; I haven't tried it yet -

https://github.com/dsedivec/dot-emacs-d/blob/master/recipes/imenu-list-in-side-buffer.el

Other characteristics -

1. [Org mode buffers] Displays headings which can be folded. The depth of headings displayed (2 by default) can be changed with `org-imenu-depth`.

side-hustle

What I like -

βœ”οΈ Makes a side window

* But...it can be deleted with `delete-other-windows`? πŸ€”

βœ”οΈ Funny name

βœ”οΈ Highlights items to indicate where you are in the buffer

βœ”οΈ Does not use icons at all. I find this more Emacs-y, like Dired.

What I don't -

❌ Does not follow the file visited in the current window, you have to run `side-hustle-toggle` each time you switch buffers.

❌ [Elisp buffers] Does not hide package prefixes

❌ Colors are all the same; uses indentation to compensate

Other characteristics -

1. [Org mode buffers] Displays headings which can be folded. The depth of headings displayed (2 by default) can be changed with `org-imenu-depth`.

Epilogue

I went with imenu-list for the moment. As and when Treemacs implements the sort of follow-behavior I want, I may consider moving to it.

Know some more sidebar solutions? Want to share your experiences?

Drop me a line!