]> git.eshelyaron.com Git - emacs.git/commit
Add ERC module querypoll as monitor placeholder
authorF. Jason Park <jp@neverwas.me>
Thu, 23 May 2024 05:59:54 +0000 (22:59 -0700)
committerEshel Yaron <me@eshelyaron.com>
Wed, 29 May 2024 10:11:54 +0000 (12:11 +0200)
commit2f884bc702df28e781e8029a5b3d67b5299564e2
tree55b12ecd44889855dcfd2f2b461c70e3e1ac1280
parent979b806cff9e8d1e50975ab2bb255c127085a853
Add ERC module querypoll as monitor placeholder

* doc/misc/erc.texi: Add module `querypoll' to list of built-in
modules'.
* etc/ERC-NEWS: Mention new module `querypoll', and explain new
default behavior for deriving query membership from that of channels.
* lisp/erc/erc-goodies.el (erc--querypoll-ring)
(erc--querypoll-timer): New variables.
(erc-querypoll-exclude-regexp): New option.
(erc-querypoll-mode, erc-querypoll-enable, erc-querypoll-disable): New
module for polling with "WHO" requests for the presence of otherwise
"untracked" query targets.
(erc-querypoll-period-params): New variable.
(erc--querypoll-compute-period)
(erc--querypoll-target-in-chan-p)
(erc--querypoll-get-length)
(erc--querypoll-get-next)
(erc--querypoll-subscribe)
(erc--querypoll-on-352)
(erc--querypoll-send): New functions.
* lisp/erc/erc-speedbar.el (erc-speedbar-buttons): Dispatch queries as
if they were channels when `erc--queries-current-p' returns non-nil.
That is, show head counts alongside query targets as users come and
go.
(erc-speedbar-insert-target): Defer to `erc--queries-current-p' to
know whether to show a query in the style of a channel.  This affects
both the plain speedbar integration as well as the `nickbar' module
added for bug#63595.  Also, use question marks rather than the empty
string for query bullets, so that query and channel items are aligned
vertically.
* lisp/erc/erc.el (erc--queries-current-p): New function.
* test/lisp/erc/erc-goodies-tests.el
(erc--querypoll-compute-period)
(erc--querypoll-target-in-chan-p)
(erc--querypoll-get-length)
(erc--querypoll-get-next): New tests.  (Bug#70928)

(cherry picked from commit 6888bbbe832e14c3aaaa2c9750ed27e577e0983d)
doc/misc/erc.texi
etc/ERC-NEWS
lisp/erc/erc-goodies.el
lisp/erc/erc-speedbar.el
lisp/erc/erc.el
test/lisp/erc/erc-goodies-tests.el