diff options
| author | F. Jason Park | 2023-12-23 12:46:33 -0800 |
|---|---|---|
| committer | F. Jason Park | 2023-12-27 21:32:25 -0800 |
| commit | 65735efdca017f2ec0aa1022b7e82f68fbe0084d (patch) | |
| tree | 9e00293e01aff32fe594e43ba484a702429a0a26 /test/lisp/erc/resources | |
| parent | 8f571769e155a214ae2f9f760dd179b687d9982e (diff) | |
| download | emacs-65735efdca017f2ec0aa1022b7e82f68fbe0084d.tar.gz emacs-65735efdca017f2ec0aa1022b7e82f68fbe0084d.zip | |
Improve multi-window erc-keep-place-indicator-mode
* lisp/erc/erc-goodies.el (erc-keep-place-indicator-follow): Describe
condition causing an indicator update.
(erc--keep-place-indicator-on-window-configuration-change,
erc--keep-place-indicator-on-window-buffer-change): Rename former to
latter, add required WINDOW parameter, and don't move indicator if
buffer appears in multiple windows. Also, don't bother checking
whether either buffer is a mini because the manual says window change
functions don't run for minibuffer replacements.
(erc--keep-place-indicator-setup): Hook on
`window-buffer-change-functions' instead of
`window-configuration-change-hook'.
(erc-keep-place-mode, erc-keep-place-disable): Remove member from
`window-buffer-change-functions' instead of
`window-configuration-change-hook'.
(erc-keep-place): Use `visible' FRAME arg of `get-buffer-window'.
Don't twiddle `window-prev-buffers' when
`erc-keep-place-indicator-mode' is non-nil. This feature was
originally introduced by bug#59943.
* test/lisp/erc/erc-goodies-tests.el
(erc-goodies-tests--assert-kp-indicator-on,
erc-goodies-tests--assert-kp-indicator-off): Update hook name.
* test/lisp/erc/erc-scenarios-keep-place-indicator.el: New file.
* test/lisp/erc/resources/keep-place/follow.eld: New file.
Diffstat (limited to 'test/lisp/erc/resources')
| -rw-r--r-- | test/lisp/erc/resources/keep-place/follow.eld | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/test/lisp/erc/resources/keep-place/follow.eld b/test/lisp/erc/resources/keep-place/follow.eld new file mode 100644 index 00000000000..e857c17175d --- /dev/null +++ b/test/lisp/erc/resources/keep-place/follow.eld | |||
| @@ -0,0 +1,73 @@ | |||
| 1 | ;; -*- mode: lisp-data; -*- | ||
| 2 | ((nick 10 "NICK tester")) | ||
| 3 | ((user 10 "USER tester 0 * :tester") | ||
| 4 | (0.00 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester") | ||
| 5 | (0.01 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version ergo-v2.11.1") | ||
| 6 | (0.01 ":irc.foonet.org 003 tester :This server was created Tue, 26 Dec 2023 08:36:35 UTC") | ||
| 7 | (0.01 ":irc.foonet.org 004 tester irc.foonet.org ergo-v2.11.1 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") | ||
| 8 | (0.00 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# CHATHISTORY=1000 ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX :are supported by this server") | ||
| 9 | (0.01 ":irc.foonet.org 005 tester KICKLEN=390 MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8ONLY WHOX :are supported by this server") | ||
| 10 | (0.01 ":irc.foonet.org 005 tester draft/CHATHISTORY=1000 :are supported by this server") | ||
| 11 | (0.01 ":irc.foonet.org 251 tester :There are 0 users and 4 invisible on 1 server(s)") | ||
| 12 | (0.01 ":irc.foonet.org 252 tester 0 :IRC Operators online") | ||
| 13 | (0.00 ":irc.foonet.org 253 tester 0 :unregistered connections") | ||
| 14 | (0.00 ":irc.foonet.org 254 tester 2 :channels formed") | ||
| 15 | (0.00 ":irc.foonet.org 255 tester :I have 4 clients and 0 servers") | ||
| 16 | (0.00 ":irc.foonet.org 265 tester 4 4 :Current local users 4, max 4") | ||
| 17 | (0.00 ":irc.foonet.org 266 tester 4 4 :Current global users 4, max 4") | ||
| 18 | (0.03 ":irc.foonet.org 422 tester :MOTD File is missing") | ||
| 19 | (0.01 ":irc.foonet.org NOTICE tester :This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.")) | ||
| 20 | |||
| 21 | ((mode 10 "MODE tester +i")) | ||
| 22 | |||
| 23 | ((join 10 "JOIN #chan") | ||
| 24 | (0.01 ":irc.foonet.org 221 tester +i") | ||
| 25 | (0.01 ":tester!~u@p64eqfwvvbxrk.irc JOIN #chan") | ||
| 26 | (0.03 ":irc.foonet.org 353 tester = #chan :@fsbot bob alice tester") | ||
| 27 | (0.01 ":irc.foonet.org 366 tester #chan :End of NAMES list") | ||
| 28 | (0.00 ":bob!~u@2q6ysndq32az6.irc PRIVMSG #chan :tester, welcome!") | ||
| 29 | (0.01 ":alice!~u@2q6ysndq32az6.irc PRIVMSG #chan :tester, welcome!")) | ||
| 30 | |||
| 31 | ((join 10 "JOIN #spam") | ||
| 32 | (0.00 ":tester!~u@p64eqfwvvbxrk.irc JOIN #spam") | ||
| 33 | (0.06 ":irc.foonet.org 353 tester = #spam :@fsbot bob alice tester") | ||
| 34 | (0.01 ":irc.foonet.org 366 tester #spam :End of NAMES list") | ||
| 35 | (0.03 ":alice!~u@2q6ysndq32az6.irc PRIVMSG #spam :tester, welcome!") | ||
| 36 | (0.01 ":bob!~u@2q6ysndq32az6.irc PRIVMSG #spam :tester, welcome!")) | ||
| 37 | |||
| 38 | ((mode 10 "MODE #chan") | ||
| 39 | (0.00 ":irc.foonet.org 324 tester #chan +Cnt") | ||
| 40 | (0.02 ":irc.foonet.org 329 tester #chan 1703579802") | ||
| 41 | (0.02 ":alice!~u@2q6ysndq32az6.irc PRIVMSG #chan :bob: Madam, my lord is gone, for ever gone.") | ||
| 42 | (0.10 ":alice!~u@2q6ysndq32az6.irc PRIVMSG #chan :The kinder we, to give them thanks for nothing.")) | ||
| 43 | |||
| 44 | ((mode 10 "MODE #spam") | ||
| 45 | (0.00 ":irc.foonet.org 324 tester #spam +Cnt") | ||
| 46 | (0.02 ":irc.foonet.org 329 tester #spam 1703579805") | ||
| 47 | (0.02 ":bob!~u@2q6ysndq32az6.irc PRIVMSG #chan :Most manifest, and not denied by himself.") | ||
| 48 | (0.02 ":bob!~u@2q6ysndq32az6.irc PRIVMSG #chan :alice: To bed, to bed: there's knocking at the gate. Come, come, come, come, give me your hand. What's done cannot be undone.") | ||
| 49 | (0.02 ":alice!~u@2q6ysndq32az6.irc PRIVMSG #chan :bob: And what I spake, I spake it to my face.") | ||
| 50 | (0.08 ":bob!~u@2q6ysndq32az6.irc PRIVMSG #chan :alice: Since you can cog, I'll play no more with you.") | ||
| 51 | (0.06 ":alice!~u@2q6ysndq32az6.irc PRIVMSG #chan :bob: The little casket bring me hither.") | ||
| 52 | (0.01 ":bob!~u@2q6ysndq32az6.irc PRIVMSG #chan :alice: Not to-night, good Iago: I have very poor and unhappy brains for drinking: I could well wish courtesy would invent some other custom of entertainment.") | ||
| 53 | (0.02 ":alice!~u@2q6ysndq32az6.irc PRIVMSG #chan :Yes, faith will I, Fridays and Saturdays and all.")) | ||
| 54 | |||
| 55 | ((privmsg 10 "PRIVMSG #spam :one") | ||
| 56 | (0.03 ":alice!~u@2q6ysndq32az6.irc PRIVMSG #chan :bob: This is the first truth that e'er thine own tongue was guilty of.") | ||
| 57 | (0.02 ":bob!~u@2q6ysndq32az6.irc PRIVMSG #chan :alice: Drown the lamenting fool in sea-salt tears.") | ||
| 58 | |||
| 59 | ;; Insert some lines ^ before rendezvous, so #chan can update scrolltobottom. | ||
| 60 | (0.01 ":bob!~u@2q6ysndq32az6.irc PRIVMSG #spam :Ay, the heads of the maids, or their maidenheads; take it in what sense thou wilt.") | ||
| 61 | |||
| 62 | (0.05 ":bob!~u@2q6ysndq32az6.irc PRIVMSG #chan :alice: And work confusion on his enemies.") | ||
| 63 | (0.06 ":alice!~u@2q6ysndq32az6.irc PRIVMSG #chan :bob: Truly, she must be given, or the marriage is not lawful.")) | ||
| 64 | |||
| 65 | ((privmsg 10 "PRIVMSG #spam :two") | ||
| 66 | (0.02 ":bob!~u@2q6ysndq32az6.irc PRIVMSG #chan :To be whipped; and yet a better love than my master.") | ||
| 67 | (0.06 ":alice!~u@2q6ysndq32az6.irc PRIVMSG #chan :And duty in his service perishing.") | ||
| 68 | |||
| 69 | ;; Second check point. | ||
| 70 | (0.01 ":bob!~u@2q6ysndq32az6.irc PRIVMSG #spam :Cause they take vengeance of such kind of men.") | ||
| 71 | |||
| 72 | (0.03 ":bob!~u@2q6ysndq32az6.irc PRIVMSG #chan :alice: No egma, no riddle, no l'envoy; no salve in the mail, sir. O! sir, plantain, a plain plantain: no l'envoy, no l'envoy: no salve, sir, but a plantain.") | ||
| 73 | (0.03 ":alice!~u@2q6ysndq32az6.irc PRIVMSG #chan :Signior Iachimo will not from it. Pray, let us follow 'em.")) | ||