emacs-erc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug#54536: 29.0.50; Improve ERC's handling of multiline prompt input


From: J.P.
Subject: Re: bug#54536: 29.0.50; Improve ERC's handling of multiline prompt input
Date: Fri, 22 Apr 2022 20:17:58 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

v3. Except for a subtle change involving compatibility, there aren't any
real differences in behavior.

"J.P." <jp@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

Attachment: 0000-v2-v3.diff
Description: Text Data

Attachment: 0001-Fix-regression-in-erc-send-input-line.patch
Description: Text Data

Attachment: 0002-Add-some-ERC-test-helpers.patch
Description: Text Data

Attachment: 0003-Improve-ERC-s-handling-of-multiline-prompt-input.patch
Description: Text Data

Attachment: 0004-SQUASH-ME-Add-hook-for-splitting-multiline-input-in-.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]