Variable: erc-accidental-paste-threshold-seconds
erc-accidental-paste-threshold-seconds is a customizable variable
defined in erc.el.gz.
Value
0.2
Documentation
Minimum time, in seconds, before sending new lines via IRC.
If the value is a number, erc-send-current-line signals an error
if its previous invocation was fewer than this many seconds ago.
If the value is nil, erc-send-current-line always considers any
submitted line to be intentional.
This option mainly prevents text accidentally entered into Emacs
from being sent to the server. Offending sources include
terminal multiplexers, desktop-automation scripts, and anything
capable of rapidly submitting successive lines of prompt input.
For example, if you could somehow manage to type "one \\`RET'
two \\`RET' three \\`RET'" at the prompt in less than
erc-accidental-paste-threshold-seconds, ERC would send "one"
to the server, leave "two" at the prompt, and insert "three"
into an "overflow" buffer. See erc-inhibit-multiline-input
and erc-warn-about-blank-lines for suppression involving input
yanked from the clipboard or the kill ring, which is a related
but separate concern.
Users of terminal multiplexers, in particular, should look into
support for "bracketed pasting", provided on the Emacs side by
libraries like xterm (and usually enabled by default). When
everything's working smoothly, Emacs transparently arranges for
pasted text to appear on the kill ring, regardless of any
read-only warnings you may encounter. And when point is in the
prompt area, ERC automatically yanks that text for previewing but
holds off on submitting it, for obvious reasons.
This variable was added, or its default value changed, in Emacs 26.1.
Probably introduced at or before Emacs version 24.4.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defcustom erc-accidental-paste-threshold-seconds 0.2
"Minimum time, in seconds, before sending new lines via IRC.
If the value is a number, `erc-send-current-line' signals an error
if its previous invocation was fewer than this many seconds ago.
If the value is nil, `erc-send-current-line' always considers any
submitted line to be intentional.
This option mainly prevents text accidentally entered into Emacs
from being sent to the server. Offending sources include
terminal multiplexers, desktop-automation scripts, and anything
capable of rapidly submitting successive lines of prompt input.
For example, if you could somehow manage to type \"one \\`RET'
two \\`RET' three \\`RET'\" at the prompt in less than
`erc-accidental-paste-threshold-seconds', ERC would send \"one\"
to the server, leave \"two\" at the prompt, and insert \"three\"
into an \"overflow\" buffer. See `erc-inhibit-multiline-input'
and `erc-warn-about-blank-lines' for suppression involving input
yanked from the clipboard or the kill ring, which is a related
but separate concern.
Users of terminal multiplexers, in particular, should look into
support for \"bracketed pasting\", provided on the Emacs side by
libraries like `xterm' (and usually enabled by default). When
everything's working smoothly, Emacs transparently arranges for
pasted text to appear on the kill ring, regardless of any
read-only warnings you may encounter. And when point is in the
prompt area, ERC automatically yanks that text for previewing but
holds off on submitting it, for obvious reasons."
:group 'erc
:version "26.1"
:type '(choice number (other :tag "disabled" nil)))