emacs-erc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug#60933: 30.0.50; ERC >5.5: Make buttonizing more extensible


From: J.P.
Subject: Re: bug#60933: 30.0.50; ERC >5.5: Make buttonizing more extensible
Date: Tue, 18 Apr 2023 07:11:59 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

This bug's main contribution has been the introduction of a function
variant for the FORM field of `erc-button-alist' entries. It was meant
to offer a more natural way to influence buttonizing than the boolean
sexps it was displacing while still retaining enough structure to
encourage maintainability (for example, by highlighting which elements
invite modification, like a button's faces and its bounds, and which are
off limits, like certain required text properties).

However, in the short term, I feel that locking this down too cleverly
will only hamstring us as we inch closer to adopting various protocol
extensions for ERC 5.7. As requirements shift beneath us, the current
design will always end up seeming overly restrictive or permissive. As
such, I think it's best to partially revert these changes and instead
look to an existing interface we already know (but don't love), namely
`erc-button-add-button'. From now on, I think we should just interpret
any function occupying the FORM field as a replacement "buttonizer" to
be called in its place.

The same general thinking applies to the nicks-specific buttonizer as
well, though it being intrinsically special and, for now, internal means
we can take more liberties in inconveniencing its consumers (which are
all built-in modules). Thus, I'm proposing we replace the slightly
unwieldy set of positional params with a single passed-around struct,
which members of the interface's "advice stack" can modify at will. See
implementation for details.

Note that these changes currently require those from "bug#62834: Make
erc-button navigation more flexible". Thanks.

Attachment: 0001-5.6-Improve-erc-button-modify-nick-function-interfac.patch
Description: Text Data

Attachment: 0002-5.6-Revise-FORM-as-function-interface-in-erc-button-.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]