1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-13 06:50:39 -08:00
emacs/test/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
..
resources Restore leading space to right-margin stamps in ERC 2024-03-23 15:10:32 -07:00
erc-button-tests.el ; Load erc-compat before ert-x in ERC tests 2024-02-16 19:58:35 -08:00
erc-dcc-tests.el ; Simplify (with-current-buffer (get-buffer ...) ...) 2024-03-14 12:40:26 +02:00
erc-fill-tests.el Make erc-fill-wrap depend on scrolltobottom 2024-02-16 19:58:35 -08:00
erc-goodies-tests.el Remove unused faces from various erc-goodies tests 2024-03-23 15:10:32 -07:00
erc-join-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-match-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-networks-tests.el ; Simplify (with-current-buffer (get-buffer ...) ...) 2024-03-14 12:40:26 +02:00
erc-nicks-tests.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
erc-sasl-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-scenarios-auth-source.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-scenarios-base-association-nick.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-scenarios-base-association-query.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-scenarios-base-association-samenet.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-scenarios-base-association.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-scenarios-base-attach.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
erc-scenarios-base-auto-recon.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
erc-scenarios-base-buffer-display.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
erc-scenarios-base-chan-modes.el Actually derive channel membership from PREFIX in ERC 2024-01-24 20:58:32 -08:00
erc-scenarios-base-compat-rename-bouncer.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-scenarios-base-local-module-modes.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
erc-scenarios-base-local-modules.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-scenarios-base-misc-regressions.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-scenarios-base-netid-bouncer-id.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-scenarios-base-netid-bouncer-recon-base.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-scenarios-base-netid-bouncer-recon-both.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-scenarios-base-netid-bouncer-recon-id.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-scenarios-base-netid-bouncer.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-scenarios-base-netid-samenet.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-scenarios-base-reconnect.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-scenarios-base-renick.el ; Load erc-compat before ert-x in ERC tests 2024-02-16 19:58:35 -08:00
erc-scenarios-base-reuse-buffers.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-scenarios-base-send-message.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
erc-scenarios-base-split-line.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
erc-scenarios-base-statusmsg.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
erc-scenarios-base-unstable.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-scenarios-base-upstream-recon-soju.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-scenarios-base-upstream-recon-znc.el Reassociate erc-networks--id for orphaned queries 2024-02-02 17:08:21 -08:00
erc-scenarios-display-message.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
erc-scenarios-ignore.el Allow updating of /IGNORE timeouts in ERC 2024-04-07 12:59:21 -07:00
erc-scenarios-internal.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-scenarios-join-auth-source.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-scenarios-join-display-context.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
erc-scenarios-join-netid-newcmd-id.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-scenarios-join-netid-newcmd.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-scenarios-join-netid-recon-id.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-scenarios-join-netid-recon.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-scenarios-keep-place-indicator.el ; Fix typos 2024-01-28 17:11:51 +01:00
erc-scenarios-log.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
erc-scenarios-match.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
erc-scenarios-misc-commands.el Make erc-cmd-AMSG session local; add /GMSG, /AME and /GME 2024-02-23 18:45:44 -08:00
erc-scenarios-misc.el Reassociate erc-networks--id for orphaned queries 2024-02-02 17:08:21 -08:00
erc-scenarios-prompt-format.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
erc-scenarios-sasl.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-scenarios-scrolltobottom-relaxed.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
erc-scenarios-scrolltobottom.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
erc-scenarios-services-misc.el ; Simplify (with-current-buffer (get-buffer ...) ...) 2024-03-14 12:40:26 +02:00
erc-scenarios-stamp.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
erc-scenarios-status-sidebar.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
erc-services-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-stamp-tests.el Restore leading space to right-margin stamps in ERC 2024-03-23 15:10:32 -07:00
erc-tests.el Allow updating of /IGNORE timeouts in ERC 2024-04-07 12:59:21 -07:00
erc-track-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00