all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Hanchrow <eric.hanchrow@gmail.com>
To: 11592@debbugs.gnu.org
Subject: bug#11592: Fwd: bug#11592: [PATCH] prevent accidental pastes in ERC
Date: Sun, 10 Jun 2012 15:04:48 -0700	[thread overview]
Message-ID: <CAHZoxq-ehVsvY42WPAZ-OkhsRJjRhSw1uMnnSU9DvqHhFPMiBg@mail.gmail.com> (raw)
In-Reply-To: <CAHZoxq8yfAYwp_LH0nMnsw-QAg9pX9AVEnLCXos7N0yTgAVeDQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

---------- Forwarded message ----------
From: Eric Hanchrow <eric.hanchrow@gmail.com>
Date: Sat, Jun 2, 2012 at 7:00 AM
Subject: Re: bug#11592: [PATCH] prevent accidental pastes in ERC
To: Chong Yidong <cyd@gnu.org>


On Sat, Jun 2, 2012 at 12:39 AM, Chong Yidong <cyd@gnu.org> wrote:
> Does this patch disable all pasting of multi-line text?

By default, it has no effect.  But when you enable it by setting the
variable erc-accidental-paste-threshold-seconds to a numeric value, it
indeed prevents pasting of multi-line text.

> That might be
> annoying, since people might want to do that sometimes.

If people ignore the variable, everything will work as it always has.
Only by deliberately setting this variable will people see a change in
Emacs' behavior.

> If the problem
> is pasting a lot of text, maybe the better approach is to set up a
> maximum amount of text that can be yanked into an erc buffer.

It's not yanking we're talking about; it's "pasting".  Pasting is
relevant only when emacs is in console mode (I should probably have
said something about that in the patch).  When I say "pasting", I mean
selecting some text in another application, then focusing _your
console program in which Emacs is running_, and then pressing the
middle mouse button (or shift+insert, or whatever).  From emacs' point
of view, "pasting" is indistinguishable from ordinary, albeit rapid,
typing.  That is why my patch is based on the time between calls to
erc-send-current-line: I can't think of any other way to distinguish
an accidental paste from ordinary typing.

[-- Attachment #2: Type: text/html, Size: 2109 bytes --]

      parent reply	other threads:[~2012-06-10 22:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-28 21:57 [PATCH] prevent accidental pastes in ERC Eric Hanchrow
2012-05-30  8:10 ` Julien Danjou
2012-05-31  0:32 ` bug#11592: " Eric Hanchrow
2012-05-31 19:24   ` Glenn Morris
2012-05-31 20:08     ` Deniz Dogan
2012-06-01  0:07       ` Eric Hanchrow
2012-06-02  7:39         ` Chong Yidong
     [not found]           ` <CAHZoxq8yfAYwp_LH0nMnsw-QAg9pX9AVEnLCXos7N0yTgAVeDQ@mail.gmail.com>
2012-06-10 22:04             ` Eric Hanchrow [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHZoxq-ehVsvY42WPAZ-OkhsRJjRhSw1uMnnSU9DvqHhFPMiBg@mail.gmail.com \
    --to=eric.hanchrow@gmail.com \
    --cc=11592@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.