From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Hanchrow Newsgroups: gmane.emacs.bugs Subject: bug#11592: Fwd: bug#11592: [PATCH] prevent accidental pastes in ERC Date: Sun, 10 Jun 2012 15:04:48 -0700 Message-ID: References: <4FC7CFC1.3020505@dogan.se> <87sjee6u36.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6d59d834ae8d904c2256d1d X-Trace: dough.gmane.org 1339365939 26398 80.91.229.3 (10 Jun 2012 22:05:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 10 Jun 2012 22:05:39 +0000 (UTC) To: 11592@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 11 00:05:38 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SdqGO-0003vf-2S for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Jun 2012 00:05:36 +0200 Original-Received: from localhost ([::1]:54796 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SdqGN-00059S-QQ for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Jun 2012 18:05:35 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SdqGJ-00059K-VT for bug-gnu-emacs@gnu.org; Sun, 10 Jun 2012 18:05:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SdqGH-0008L2-UV for bug-gnu-emacs@gnu.org; Sun, 10 Jun 2012 18:05:31 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SdqGH-0008Kx-NG for bug-gnu-emacs@gnu.org; Sun, 10 Jun 2012 18:05:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SdqIk-0001aD-7E for bug-gnu-emacs@gnu.org; Sun, 10 Jun 2012 18:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eric Hanchrow Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Jun 2012 22:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11592 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 11592-submit@debbugs.gnu.org id=B11592.13393660676065 (code B ref 11592); Sun, 10 Jun 2012 22:08:02 +0000 Original-Received: (at 11592) by debbugs.gnu.org; 10 Jun 2012 22:07:47 +0000 Original-Received: from localhost ([127.0.0.1]:37077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SdqIV-0001Zm-0c for submit@debbugs.gnu.org; Sun, 10 Jun 2012 18:07:47 -0400 Original-Received: from mail-wi0-f170.google.com ([209.85.212.170]:53149) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SdqIS-0001Zd-09 for 11592@debbugs.gnu.org; Sun, 10 Jun 2012 18:07:45 -0400 Original-Received: by wibhm6 with SMTP id hm6so2749252wib.3 for <11592@debbugs.gnu.org>; Sun, 10 Jun 2012 15:05:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=CedNI48xsvB3yVd0mOPEhP1Rmakw+IBKHE7+j+4mnAY=; b=bqFAzrWmOh9tEBrX4GwRc629SN+KHiDEUnQ9kdpj5EBd9HAsxQ5Xmt7cjRxB4cQEZx 8bnQPJesj5+kbeJqcXZn+LwARJeY2HnaaX6JLPU4zMGfwWEstBNT9TiKR245odcHV7pp LjknMU47kTiWQQb4Pk2EQEbQApVtLj4iSqTSs/xDN+/7N43hCrfLAK5ajq2ZlLO4hzmh UX663JXeJEodAyUitT9jMoLghm2DD7XJrYeTV+ieyCM/eTCMtPUm6BJisY99c2bk/Q/M 3pA+D0br4bEhWU6T+uwPQGKlQhQ1lvggINtgn0A7pIFXlGVX8NCWYOA/F1mYrDPGZr0n sPVw== Original-Received: by 10.216.144.228 with SMTP id n78mr5104156wej.26.1339365910046; Sun, 10 Jun 2012 15:05:10 -0700 (PDT) Original-Received: by 10.223.86.197 with HTTP; Sun, 10 Jun 2012 15:04:48 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:60854 Archived-At: --0016e6d59d834ae8d904c2256d1d Content-Type: text/plain; charset=UTF-8 ---------- Forwarded message ---------- From: Eric Hanchrow Date: Sat, Jun 2, 2012 at 7:00 AM Subject: Re: bug#11592: [PATCH] prevent accidental pastes in ERC To: Chong Yidong On Sat, Jun 2, 2012 at 12:39 AM, Chong Yidong 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. --0016e6d59d834ae8d904c2256d1d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

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


By default, it has no effect. =C2=A0But 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&= quot;. =C2=A0Pasting is
relevant only when emacs is in console mode (I should probably have
said something about that in the patch). =C2=A0When I say "pasting&quo= t;, 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). =C2=A0From emacs' p= oint
of view, "pasting" is indistinguishable from ordinary, albeit rap= id,
typing. =C2=A0That 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.

--0016e6d59d834ae8d904c2256d1d--