GNU bug report logs -
#54536
29.0.50; Improve ERC's handling of multiline prompt input
Previous Next
Reported by: "J.P." <jp <at> neverwas.me>
Date: Wed, 23 Mar 2022 13:27:02 UTC
Severity: normal
Tags: patch
Found in version 29.0.50
Fixed in version 29.1
Done: "J.P." <jp <at> neverwas.me>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
v3. Except for a subtle change involving compatibility, there aren't any
real differences in behavior.
"J.P." <jp <at> neverwas.me> writes:
> 4. Should slash commands, like /MSG be allowed to lead a multiline
> submission?
>
> This patch says no, still choosing to interpret commands as always
> consisting of a single line.
This description is rather sloppy and ambiguous, so I have attempted to
clarify things below (underscores are spaces). The subtle compat change
happens between the first two examples. Basically, when the option
`erc-send-whitespace-lines' is active and trailing blank lines are
present, the new (v3) iteration of this patch no longer interprets slash
commands but instead just sends lines as text. This more closely mirrors
traditional ERC behavior.
(I suppose we could also have an option to go the other, v2 route, if
people want.)
Patch v2 (previous)
~~~~~~~~~~~~~~~~~~~
- `erc-send-whitespace-lines' ON
- All trailing blanks stripped
- Command interpreted
- Nothing inserted (unless echo-message cap negotiated, coming in #49860)
input:
. ERC> /msg #chan hi
.
. [RET]
I/O:
-> PRIVMSG #chan :hi
shown:
(nothing)
Patch v3 (this)
~~~~~~~~~~~~~~~
- `erc-send-whitespace-lines' ON
- Trailing blanks stripped
- Command not interpreted
input:
. ERC> /msg #chan hi
.
. [RET]
I/O:
-> PRIVMSG #chan :/msg #chan hi
shown:
<me> /msg #chan hi
The rest are just included for good measure, but none has changed:
HEAD
~~~~
- `erc-send-whitespace-lines' ON or OFF
- Trailing blanks not stripped or padded
- Command not interpreted
- Protocol violation (my fault from #50008, not in 5.4.1 or 28)
input:
. ERC> /msg #chan hi
. [RET]
I/O:
-> PRIVMSG #chan :/msg #chan hi
-> PRIVMSG #chan :
<- :irc.foonet.org 412 me :No text to send
shown:
. <me> /msg #chan hi
. <me>
. *** No text to send
Patch v2 and v3
~~~~~~~~~~~~~~~
- `erc-send-whitespace-lines' OFF
- ding, input remains, echo area says "Blank line - ignoring ..."
input:
. ERC> /msg #chan hi
. _* [RET]
I/O:
(nothing)
shown:
(nothing)
All (HEAD, v2, v3)
~~~~~~~~~~~~~~~~~~
- `erc-send-whitespace-lines' ON (or OFF when old)
- Command not interpreted
- User-padded trailing blank preserved
input:
. ERC > /msg #chan hi
. _ [RET]
I/O:
-> PRIVMSG #chan :/msg #chan hi
-> PRIVMSG #chan :_
shown:
<me> /msg #chan hi
<me>
- `erc-send-whitespace-lines' ON (or OFF when old)
- Command not interpreted
- Intervening blank padded
input:
. ERC> /msg #chan hi
.
. again [RET]
I/O:
-> PRIVMSG #chan :/msg #chan hi
-> PRIVMSG #chan :_
-> PRIVMSG #chan :again
shown:
<me> /msg #chan hi
<me>
<me> again
[0000-v2-v3.diff (text/x-patch, attachment)]
[0001-Fix-regression-in-erc-send-input-line.patch (text/x-patch, attachment)]
[0002-Add-some-ERC-test-helpers.patch (text/x-patch, attachment)]
[0003-Improve-ERC-s-handling-of-multiline-prompt-input.patch (text/x-patch, attachment)]
[0004-SQUASH-ME-Add-hook-for-splitting-multiline-input-in-.patch (text/x-patch, attachment)]
This bug report was last modified 2 years and 321 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.