emacs/lisp/erc
F. Jason Park e0df2841fb Allow updating of /IGNORE timeouts in ERC
* lisp/erc/erc.el (erc--read-time-period, erc--decode-time-period):
Move body of former, now a superficial wrapper, to latter, a new
function.
(erc--format-time-period): New function.
(erc--get-ignore-timer-args): New function.
(erc--find-ignore-timer): New function to search through `timer-list'
to find matching ignore timer.
(erc-cmd-IGNORE): Refactor and redo doc string.  Add new optional
`timespec' parameter, primarily to aid in testing.  Update an existing
timer instead of always creating one, and display time remaining in
"ignore list" output.  Pass server buffer instead of current buffer to
timer callbacks because `erc--unignore-user' displays its messages in
the `active' buffer, not necessarily the issuing one.  Note that doing
this does discard potentially useful information, so if ever reverting,
we can change the `cl-find' :test in `erc--find-ignore-timer' to
something that compares the `erc-server-process' of both buffers.
;;
;; Something like:
;;
;; (defun erc--ignore-timers-equal-p (a b)
;;   (and (equal (car a) (car b))
;;        (eq (buffer-local-value 'erc-server-process (cadr a))
;;            (buffer-local-value 'erc-server-process (cadr b)))))
;;
(erc-cmd-UNIGNORE): Pass `erc-ignore-list' member matching `user'
parameter to `erc--unignore-user' instead of original, raw parameter,
along with the server buffer.
(erc--unignore-user): Cancel existing timer and don't bother switching
to server buffer since we're already there.
(erc-message-english-ignore-list): New variable.
* test/lisp/erc/erc-scenarios-ignore.el: New file.
* test/lisp/erc/erc-tests.el (erc--read-time-period): New test.
(erc-cmd-UNIGNORE): New test.  (Bug#70127)
2024-04-07 12:59:21 -07:00
..
ChangeLog.1 ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
ChangeLog.2 ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-autoaway.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-backend.el ; Don't mention erc-branded Compat macros in ERC-NEWS 2024-02-23 18:29:07 -08:00
erc-button.el Make important text props more resilient in ERC 2024-03-10 06:11:29 -07:00
erc-capab.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-common.el ; Fix typos 2024-02-04 11:06:50 +01:00
erc-compat.el Remove "erc-" prefixed Compat definitions 2024-02-16 19:58:35 -08:00
erc-dcc.el ; Simplify (with-current-buffer (get-buffer ...) ...) 2024-03-14 12:40:26 +02:00
erc-desktop-notifications.el Port more notification senders to non-XDG systems 2024-03-13 11:01:39 +08:00
erc-ezbounce.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-fill.el Make erc-fill-wrap depend on scrolltobottom 2024-02-16 19:58:35 -08:00
erc-goodies.el Reuse command-indicator code for script lines in ERC 2024-03-23 15:10:32 -07:00
erc-ibuffer.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-identd.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-imenu.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-join.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-lang.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-list.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-log.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-match.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-menu.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-netsplit.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-networks.el Reassociate erc-networks--id for orphaned queries 2024-02-02 17:08:21 -08:00
erc-nicks.el ; * lisp/erc/erc-nicks.el: Fix typo in Commentary. 2024-04-07 12:59:21 -07:00
erc-notify.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-page.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-pcomplete.el Clarify purpose of module aliases in ERC 2024-01-07 15:11:26 -08:00
erc-replace.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-ring.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-sasl.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-services.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-sound.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-speedbar.el ; Load erc-compat before ert-x in ERC tests 2024-02-16 19:58:35 -08:00
erc-spelling.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-stamp.el Restore leading space to right-margin stamps in ERC 2024-03-23 15:10:32 -07:00
erc-status-sidebar.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-track.el ; Fix typos in symbol names 2024-01-21 15:28:06 +01:00
erc-truncate.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-xdcc.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc.el Allow updating of /IGNORE timeouts in ERC 2024-04-07 12:59:21 -07:00