GNU bug report logs - #54536
29.0.50; Improve ERC's handling of multiline prompt input

Previous Next

Package: emacs;

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

From: "J.P." <jp <at> neverwas.me>
To: 54536 <at> debbugs.gnu.org
Cc: emacs-erc <at> gnu.org
Subject: bug#54536: 29.0.50; Improve ERC's handling of multiline prompt input
Date: Fri, 29 Apr 2022 06:05:26 -0700
[Message part 1 (text/plain, inline)]
v4.

I've decided it's probably better to abstain from exporting the input
validation hooks or their members without good reason. Likewise for the
hook involving split-lines and command-detection. So they've all been
renamed as internal, for now.

This version also brings with it some out-of-scope feature creep in
response to recent clamoring for a way to prevent all multiline input.
I've therefore added two options and wired them into the pre-send
validation mechanism introduced earlier in this series. The first is
called `erc-inhibit-multiline-input', which must be either a positive
integer or t. As an int, it indicates the maximum number of lines
allowed to be submitted for sending (above which a beep and a scolding
result). The second is called `erc-ask-about-multiline-input'. When
non-nil, instead of getting scolded, the user is asked whether to go
ahead and send anyway (just this once).

A few (arguably surprising) idiosyncrasies surround the interaction
between `erc-send-whitespace-lines' and these newly proposed options,
but nothing too radical or inconsistent (IMO). For example, during the
reckoning of `erc-inhibit-multiline-input', trailing blanks are always
trimmed, but when `erc-send-whitespace-lines' is nil, this becomes
irrelevant because the send is preempted beforehand, which is in line
with the behavior described in the initial bug report.


[0000-v3-v4.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-Optionally-prevent-sending-multiline-input-in-ERC.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.