Emacs: which-function-mode

The problem

I sometimes work with long functions or big org subtrees and it's not always clear what function or org subtree I'm in right now. I wish there is a package that can show me what function I'm in.

which-function-mode

Turns out Emacs has this mode built-in so this functionality is just M-x which-function-mode away. It shows in the status line a function name I'm currently in (see [encode_terminal_code] on the screenshot above). It's global mode so as soon as it's enabled, you'll see it's working for every buffer. You can have it enabled on Emacs startup by adding (which-function-mode) to your config file. I just started to get benefits of this mode but it's already surprising how well it works:

It doesn't seem to work in html files I tried it with or modes that use html (e.g. vuejs or laravel blade files). It definitely not an issue for me so I'm going to continue using it and I suggest you to try it out.

Proxy Information
Original URL
gemini://g.codelearn.me/2024-02-02-emacs-which-function-mode.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
510.326413 milliseconds
Gemini-to-HTML Time
0.181797 milliseconds

This content has been proxied by September (ba2dc).