From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Brett Gilio Newsgroups: gmane.emacs.bugs Subject: bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch* Date: Wed, 07 Oct 2020 11:56:02 -0500 Message-ID: <87sgaqgel9.fsf@debian> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6975"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cc: 43847@debbugs.gnu.org To: Corwin Brust Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 07 19:04:05 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kQCrF-0001if-8d for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Oct 2020 19:04:05 +0200 Original-Received: from localhost ([::1]:39964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kQCrE-0000mz-Al for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Oct 2020 13:04:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQCkQ-0001a6-L5 for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2020 12:57:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46417) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kQCkQ-0003qr-7S for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2020 12:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kQCkQ-0004cG-6M for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2020 12:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Brett Gilio Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Oct 2020 16:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43847 X-GNU-PR-Package: emacs Original-Received: via spool by 43847-submit@debbugs.gnu.org id=B43847.160208977717694 (code B ref 43847); Wed, 07 Oct 2020 16:57:02 +0000 Original-Received: (at 43847) by debbugs.gnu.org; 7 Oct 2020 16:56:17 +0000 Original-Received: from localhost ([127.0.0.1]:57963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQCjh-0004bJ-68 for submit@debbugs.gnu.org; Wed, 07 Oct 2020 12:56:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQCjc-0004b4-CQ for 43847@debbugs.gnu.org; Wed, 07 Oct 2020 12:56:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48289) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kQCjW-0003k6-MU; Wed, 07 Oct 2020 12:56:06 -0400 Original-Received: from [2605:6000:1a0d:48fb::8e5] (port=47398 helo=debian) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kQCjU-0005Ir-4W; Wed, 07 Oct 2020 12:56:05 -0400 In-Reply-To: (Corwin Brust's message of "Wed, 7 Oct 2020 09:11:48 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:190044 Archived-At: Corwin Brust writes: > I hate it when I accidentally paste multi-line text into ERC. I > *never* actually intend to do this. > > This patch provides erc-yank and binds it to C-y for erc-mode buffers. > This does the same as `yank'; however, the text is unfilled (collapsed > to a single line) before it is inserted. > > It might make sense to have a defcustom to get back the old behavior > but I haven't included that. This is my second attempt at sharing a > patch for Emacs; I sent one about an hour ago. I believe, taking both > patches together, I should be pretty close to the max for tiny-change. > I've started the copyright assignment process. > > All feedback gratefully received :) > A possible alternative behavior could be somewhat similar to what CIRCE does, but may be more intensive to implement. CIRCE, when pasting multiline content offers to send the content to a paste-service, and then kills the URL to the buffer and sends that instead. What if we had a paste.emacs.org that ERC could utilize here? Just a thought. Brett Gilio