alphapapa / topsy.el

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

Document alternative topsy functions #9

Closed josephmturner closed 1 year ago

alphapapa commented 1 year ago

Hi Joseph,

I tried the new function in the patch, and I can see how some users might prefer it, because it seems to use the header line as an extra line of buffer text when the window-start isn't inside a list, but I'm not sure it's more "correct" than the existing behavior, so I'm not sure it should replace the current function.

A possible alternative would be to define a new option like topsy-goto-header-function, call it in topsy--beginning-of-defun instead of beginning-of-defun, and set its default value to beginning-of-defun. Then an alternative value for that option could be backward-up-list or a function that called it like (backward-up-list most-positive-fixnum t t), like in your patch.

What do you think? Thanks.

josephmturner commented 1 year ago

Thanks for your feedback, Adam. I force-pushed another solution - just document an alternative function that users can cl-pushnew onto topsy-mode-functions. You topsy design is already flexible enough to handle my desired behavior.

alphapapa commented 1 year ago

Hi Joseph,

These seem like basically good ideas, but this PR now seems to make 3 unrelated changes, and I'd like to discuss them separately. Would you be willing to split them up? Otherwise I'll cherry-pick changes and credit you as the author when I do. Thanks.

josephmturner commented 1 year ago

This PR now seems to make 3 unrelated changes, and I'd like to discuss them separately. Would you be willing to split them up?

Sure! I've split this PR into #10, #11, #12, #13, and #14.