alphapapa / topsy.el

Simple sticky header showing definition beyond top of window
GNU General Public License v3.0
100 stars 6 forks source link

Comparison to which-func.el #6

Open skangas opened 3 years ago

skangas commented 3 years ago

You might want to mention in the README the package which-func.el, shipped with Emacs. It is based on imenu, so I believe it should support any major mode that supports imenu.

(My thinking is that which-func.el should probably also grow the capability to display the current function in the header-line.)

Thanks for the package!

alphapapa commented 3 years ago

Hi Stefan,

Do you mean to use which-func as the backend for getting the string to display in the header line? That could be useful, yes. I use it in dogears:

https://github.com/alphapapa/dogears.el/blob/c05b69e504a538c9e00fbb0ea86934fafe191d0c/dogears.el#L401

But in topsy I prefer to use the whole line in the source code, so I can see the form type, arguments, etc--for Lisp, anyway. For other modes, yes, Imenu and/or which-func could be useful.

Maybe I should try to use which-func as a fallback for non-Lisp modes, and offer it as a choice in the custom type.

Thanks.

skangas commented 3 years ago

Support for which-func could be useful, or perhaps going the other way around by merging this functionality into which-func itself. (But I'm really not sure if the latter makes any sense.)

To be quite honest, I mostly just noticed some overlap in functionality here, so I had hoped that you had more to add. Perhaps this would just come down to a documentation update to mention that users could try which-func as well, if they like?