From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 07 10:12:06 2020 Received: (at submit) by debbugs.gnu.org; 7 Oct 2020 14:12:06 +0000 Received: from localhost ([127.0.0.1]:57634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQAAn-0004cf-6F for submit@debbugs.gnu.org; Wed, 07 Oct 2020 10:12:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:60392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQAAk-0004cX-Si for submit@debbugs.gnu.org; Wed, 07 Oct 2020 10:12:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQAAk-0004Ni-OP for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2020 10:12:02 -0400 Received: from mail-ed1-f49.google.com ([209.85.208.49]:45446) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kQAAj-0001sQ-6N for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2020 10:12:02 -0400 Received: by mail-ed1-f49.google.com with SMTP id l17so2304798edq.12 for ; Wed, 07 Oct 2020 07:12:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=iYv7fx1L6P5rFvQAN2mJo3LKaBLwt7SVoJs3DJavp5M=; b=txX8WePjZ8EmYI4nxN6nZlptn/jqgwGjTU3Y7itBQ1NYcPQTUqgzFNdkjz+mEL2tHD +B6nDE/eNbHVRdjGZtwiP5e6BxZddgSwq479MKHvatKn295b2JMh6j9HTDaEra+RrHQ4 VBaA6nUKbIPVvojn2pJ4s73/pzjxbZcTSwU6MWGY0HtjdZanOfb+1yjZpV9F2jxtpyCE eaanGBDnPzz+tKDsBxAukyidRoNoYiZ0PLFXzLWNV5dpciwM4vkgPiEeChFC25yIdiUK AlVEDWQIRgd9kI0DAKyKmjZSWjSUQH2QR3YRqaBVwRqcBBnh7mO3jO/cVr6X88SwpLSE 9Q7w== X-Gm-Message-State: AOAM5309lo8hWHmy5mLoTrY1aN9jpkTyzxEvwL2xc3Sm+gd1js9sIdIn t38Coul49cMtmjVpc6qdjfZpsa59b9erZIBuGCBXRT+zGaVouQ== X-Google-Smtp-Source: ABdhPJwdOeWFO3V2HiYpV+zRSBrZT4N6xSaeYOzYDO0xIY78m41mgZVqpVsR6DUs0LeSZRm4xd8Y9swpvx0esN3XgvE= X-Received: by 2002:a50:9fa8:: with SMTP id c37mr3818709edf.233.1602079919436; Wed, 07 Oct 2020 07:11:59 -0700 (PDT) MIME-Version: 1.0 From: Corwin Brust Date: Wed, 7 Oct 2020 09:11:48 -0500 Message-ID: Subject: ERC - prevent yanking multiple lines into IRC (feature request) *patch* To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=209.85.208.49; envelope-from=mplscorwin@gmail.com; helo=mail-ed1-f49.google.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/07 10:12:00 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.8 (-) 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 :) In GNU Emacs 27.1 (build 1, x86_64-w64-mingw32) of 2020-08-21 built on CIRROCUMULUS Repository revision: 86d8d76aa36037184db0b2897c434cdaab1a9ae8 Repository branch: HEAD Windowing system distributor 'Microsoft Corp.', version 10.0.18363 System Description: Microsoft Windows 10 Home (v10.0.1909.18363.1082) Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --without-dbus --host=x86_64-w64-mingw32 --without-compress-install 'CFLAGS=-O2 -static'' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2 HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER LCMS2 GMP Important settings: value of $LANG: ENU locale-coding-system: cp1252 Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 46659 8583) (symbols 48 6075 1) (strings 32 16982 2021) (string-bytes 1 519943) (vectors 16 9274) (vector-slots 8 123598 13156) (floats 8 22 312) (intervals 56 222 0) (buffers 1000 12)) Corwin From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 07 11:27:25 2020 Received: (at 43847) by debbugs.gnu.org; 7 Oct 2020 15:27:25 +0000 Received: from localhost ([127.0.0.1]:57729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQBLh-0006Wp-2a for submit@debbugs.gnu.org; Wed, 07 Oct 2020 11:27:25 -0400 Received: from mail-qk1-f172.google.com ([209.85.222.172]:34726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQBLe-0006WZ-Tp for 43847@debbugs.gnu.org; Wed, 07 Oct 2020 11:27:23 -0400 Received: by mail-qk1-f172.google.com with SMTP id c62so3222470qke.1 for <43847@debbugs.gnu.org>; Wed, 07 Oct 2020 08:27:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=FTnAdWfmnTjzv14EE0yyfJLridSZ6eCDl6lpDLvFtKI=; b=eRliVQM0wYjqoubN4XcYhRKj2luSnMWuUk2IJH9xfpqmV/uOPOflQSsxQfjERutE3Q OHLflaSWfQkwdkAUVtzJxv95xbzo1Jy+WLXqfJ1NwK/Vzjex6sW85gzNkzBZreC70LpQ JJTJC6g80SIQpMtbo/3BO6LkJ82NxpVSZuGhiKpYtjBmhh4S9gUaQ1TdwGMgrEJB063P jMtIAUlH3OHeSesGG4tIrGDJKUkTF+VBRiGMZVgyMpw09Tin28UGALOHTQJfcR924WAm GqxeEF+p40x1ueez7lIBBY4o+QqLvsR3yvFComGkh/3WLDitnN6q0vwLC0IyxpTUS1zs +GQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=FTnAdWfmnTjzv14EE0yyfJLridSZ6eCDl6lpDLvFtKI=; b=JzYxMM2BHNadumlvGxTjtK14sA52YkiF1Rx1uPGoZ2/5kWopqchsJaqTtM1M+tE4OM AR7ZEPWoeXbZiBioSBa3PdLKeUiiHI8prTL0xtuYiHHKCqUUQEK6f25/cAC1KSq0p+RT FqnUZltb0JA2hQg5041xtAxjduz68bls5J04E4VVdOs1Qr46vde/MfQpaTBHmU4jiklo FGdV+wp14u2DlLp683owqgchRPHmyuBtAzhJGrwdoFsdfmg094uVlTBV3YQIoasTHo7j au6NxfMVY/iVdjIWDemGGJ9a/gfBflq8iiScma2uG78hup8IV/G1SwD12ftfqpif54DC 9zZA== X-Gm-Message-State: AOAM532NyGRoEOH7FsqPgCWkSC7GqV27AqzdIMizLAaNLnceFRy6JOUS BGnvdEEJ7n4i6QncYgzffdjrJ6bJ2XI= X-Google-Smtp-Source: ABdhPJxz0xWOKqlCRhI18yRvDbt0AZykYBscgHtTSfmlW8U3zuaq8cXscgCuUASkMiLesDHsm8oxAA== X-Received: by 2002:a37:aec2:: with SMTP id x185mr3333904qke.73.1602084437135; Wed, 07 Oct 2020 08:27:17 -0700 (PDT) Received: from vhost2 (CPE001143542e1f-CMf81d0f809fa0.cpe.net.cable.rogers.com. [99.230.38.42]) by smtp.gmail.com with ESMTPSA id x75sm58498qka.59.2020.10.07.08.27.16 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Oct 2020 08:27:16 -0700 (PDT) From: Noam Postavsky To: Corwin Brust Subject: Re: bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch* References: Date: Wed, 07 Oct 2020 11:27:14 -0400 In-Reply-To: (Corwin Brust's message of "Wed, 7 Oct 2020 09:11:48 -0500") Message-ID: <85mu0yxdil.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43847 Cc: 43847@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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. > All feedback gratefully received :) I think you may have forgotten to include the patch :) From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 07 11:31:07 2020 Received: (at 43847) by debbugs.gnu.org; 7 Oct 2020 15:31:07 +0000 Received: from localhost ([127.0.0.1]:57738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQBPG-0006e3-UU for submit@debbugs.gnu.org; Wed, 07 Oct 2020 11:31:07 -0400 Received: from mail-ed1-f44.google.com ([209.85.208.44]:38270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQBPE-0006dW-3M for 43847@debbugs.gnu.org; Wed, 07 Oct 2020 11:31:05 -0400 Received: by mail-ed1-f44.google.com with SMTP id i5so2625815edr.5 for <43847@debbugs.gnu.org>; Wed, 07 Oct 2020 08:31:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wxIx62OEKPB+1sZlJDAv+HpttkLmk0h2wNgltuCib+w=; b=jaf8YacXSwyCUEguIFDqLocn6RO0I3T3Veb58i8jce5ha0McIWK9r3XUB7tEeQhNEf 3Fh/hfmQOjt/sUBUjrtIwoTtfCXDtuix+VN/tLm+hUJzJ8pn1U9m8VQ86HxrceLqRa8G qVCrp/SNZqBUAJ6V5sfKv5+nsYA3OTMyQSmBGK5nOlrvgviKu7i/VtHbAISdBmaiCigg 0xD8nnO7F33srTj+eiagL8TCnLGJEMrhLYF5lTWE+yVnySI0NhlP/gqUR+0aVt/F7tJK e3shERHPIHICxoMiU78kMog2nFFi9SmDdAcHunDPtZ02V0lNE5AU8UbXNv2+ouZrmDMJ hTlQ== X-Gm-Message-State: AOAM533+5e9KrHuMekKxpsczOOXbvx20FMmSxFujPfO6bhXPmzG2APLF YKlxb0rdpvmZctOvH8xeOSynqS7WIdbQZeQyAdo= X-Google-Smtp-Source: ABdhPJwRbkhAMgALhfTaT5VtTizwyOD6Gak4Mq6EFaWG28e64ivzYMn7Jrv9C96cOuCt+VYnrvj/EyirldXEP6JOneA= X-Received: by 2002:aa7:d30f:: with SMTP id p15mr4070197edq.256.1602084658266; Wed, 07 Oct 2020 08:30:58 -0700 (PDT) MIME-Version: 1.0 References: <85mu0yxdil.fsf@gmail.com> In-Reply-To: <85mu0yxdil.fsf@gmail.com> From: Corwin Brust Date: Wed, 7 Oct 2020 10:30:47 -0500 Message-ID: Subject: Re: bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch* To: Noam Postavsky Content-Type: multipart/mixed; boundary="000000000000f6b9c405b11666d1" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 43847 Cc: 43847@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --000000000000f6b9c405b11666d1 Content-Type: text/plain; charset="UTF-8" Goldarn. On Wed, Oct 7, 2020 at 10:27 AM Noam Postavsky wrote: > > Corwin Brust writes: > > > All feedback gratefully received :) > > I think you may have forgotten to include the patch :) > Thanks so much Noam. Corwin --000000000000f6b9c405b11666d1 Content-Type: application/octet-stream; name="erc-yank.patch" Content-Disposition: attachment; filename="erc-yank.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kfzjtvp10 ZGlmZiAtdSAiYzovZW1hY3Mvc2hhcmUvZW1hY3MvMjcuMS9saXNwL2VyYy9lcmMuZWwtMjcuMSIg ImM6L2VtYWNzL3NoYXJlL2VtYWNzLzI3LjEvbGlzcC9lcmMvZXJjLmVsIg0KLS0tIGM6L2VtYWNz L3NoYXJlL2VtYWNzLzI3LjEvbGlzcC9lcmMvZXJjLmVsLTI3LjEJMjAyMC0xMC0wNyAwODoxMDoz NS4wMDAwMDAwMDAgLTA1MDANCisrKyBjOi9lbWFjcy9zaGFyZS9lbWFjcy8yNy4xL2xpc3AvZXJj L2VyYy5lbAkyMDIwLTEwLTA3IDA4OjE5OjM2LjIwNTcwMDYwMCAtMDUwMA0KQEAgLTExNTQsNiAr MTE1NCw3IEBADQogICAgIChkZWZpbmUta2V5IG1hcCAiXEMtbSIgJ2VyYy1zZW5kLWN1cnJlbnQt bGluZSkNCiAgICAgKGRlZmluZS1rZXkgbWFwICJcQy1hIiAnZXJjLWJvbCkNCiAgICAgKGRlZmlu ZS1rZXkgbWFwIFtob21lXSAnZXJjLWJvbCkNCisgICAgKGRlZmluZS1rZXkgbWFwICJcQy15IiAn ZXJjLXlhbmspDQogICAgIChkZWZpbmUta2V5IG1hcCAiXEMtY1xDLWEiICdlcmMtYm9sKQ0KICAg ICAoZGVmaW5lLWtleSBtYXAgIlxDLWNcQy1iIiAnZXJjLXN3aXRjaC10by1idWZmZXIpDQogICAg IChkZWZpbmUta2V5IG1hcCAiXEMtY1xDLWMiICdlcmMtdG9nZ2xlLWludGVycHJldC1jb250cm9s cykNCkBAIC00MDg0LDYgKzQwODUsMTkgQEANCiAgICAgICAgIChzZXRxIGVyYy1pbnB1dC1yaW5n LWluZGV4IG5pbCkpDQogICAgIChraWxsLWxpbmUpKSkNCiANCisoZGVmdW4gZXJjLXlhbmsgKCZv cHRpb25hbCBhcmcpDQorICAiVW5maWxsIHRoZW4geWFuay4gIEFSRyBpcyBoYW5kbGVkIGJ5IGB5 YW5rJywgd2hpY2ggc2VlLiINCisgIChpbnRlcmFjdGl2ZSkNCisgIChpbnNlcnQNCisgICAoc2F2 ZS1leGN1cnNpb24NCisgICAgICh3aXRoLXRlbXAtYnVmZmVyDQorICAgICAgICh5YW5rIGFyZykN CisgICAgICAgKGdvdG8tY2hhciAocG9pbnQtbWluKSkNCisgICAgICAgKGxldCAoKGZpbGwtY29s dW1uIChwb2ludC1tYXgpKQ0KKwkgICAgIChlbWFjcy1saXNwLWRvY3N0cmluZy1maWxsLWNvbHVt biB0KSkNCisJIChmaWxsLXBhcmFncmFwaCkpDQorICAgICAgIChidWZmZXItc3RyaW5nKSkpKSkN CisNCiAoZGVmdW4gZXJjLWNvbXBsZXRlLXdvcmQtYXQtcG9pbnQgKCkNCiAgIChydW4taG9vay13 aXRoLWFyZ3MtdW50aWwtc3VjY2VzcyAnZXJjLWNvbXBsZXRlLWZ1bmN0aW9ucykpDQogDQoNCkRp ZmYgZmluaXNoZWQuICBXZWQgT2N0ICA3IDA4OjIwOjAxIDIwMjANCg== --000000000000f6b9c405b11666d1-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 07 12:05:13 2020 Received: (at 43847) by debbugs.gnu.org; 7 Oct 2020 16:05:13 +0000 Received: from localhost ([127.0.0.1]:57795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQBwG-0007WF-R8 for submit@debbugs.gnu.org; Wed, 07 Oct 2020 12:05:13 -0400 Received: from mail-qt1-f169.google.com ([209.85.160.169]:41937) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQBwD-0007Vl-W7 for 43847@debbugs.gnu.org; Wed, 07 Oct 2020 12:05:10 -0400 Received: by mail-qt1-f169.google.com with SMTP id j22so2308778qtj.8 for <43847@debbugs.gnu.org>; Wed, 07 Oct 2020 09:05:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=yzM9gyHIrLVwQI5GtPX9/SNJ459CBvFT3IUOr24G3z8=; b=pp+v9EBv+Chpe3P0h6Sb4PBQQC18qtrCp0K26voqaPaeP10hqXupKP2XMRBcbYEHkz uEdb8yy1HY+DQ6QMlYL5mds79Ru96ITAskQ/Ys60XCE7ZkZbYUxLBLwavAA1UDTDObxQ tdPs4vVHoKfXNjAEoPIrF5jIYC82igQotpfDEvjSga4RvcFPWsfWSF7XevwLXcuGRbZs 1CDxZ10rPEyk0/wDoe4HAJkyc5roCW4ic9PprGVmmKfn9qX5443QTlYwQgLvqDjPlX/f XdAt8f5zcBbnwpniyNZ3jB6Fd49S0O5JFlco4bqiRB+rpgfDLlgx02P6RqUTNmud2Eqt +oHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=yzM9gyHIrLVwQI5GtPX9/SNJ459CBvFT3IUOr24G3z8=; b=ZKQZgWLypZfLK9eFWph7+BiSXwxslAsVbbc2OXpY09NrCI8A+CEbk9DtU6Y1ZgYoW4 WCu3/SkJylZpN4BmEaspCjzLH20FzipDU7e2Wj8PYh2tTRV0ahBwC7CorlnWi3wvo/95 j2/dzUzBfw6yTj3g2MLhiGW4Y64MN7vcXZ5vlIIsgzzff0ToFiRo6k10TTUtNj1u9f6f QQAvfEWOH6jl0MAr9nzrIDKzhD4XAn2Da5knBF0ksR128soOCEyY6Gy4vqjzxHz38teg +LFPfSfRjLYxxYuRrV1TF99rC1Twh0H+slBOZXiJWWO2nXEn4cEn3dlhmQTH0C2JVorE Km/A== X-Gm-Message-State: AOAM531IwI4DpsUucMmUdG4jmP91lO0WX4b5Luj6qlSXvYt+M44ByJSI 7Sw7KqZTPJuylNe77dM1I6ByYHaxxOA= X-Google-Smtp-Source: ABdhPJx3CaRLWSnQsGHPYRBJciPrjLP5w8tCUSKt91D7pQhjX1XFs3dL8hiMDHJfceh5RX3RiL+QXQ== X-Received: by 2002:ac8:46c2:: with SMTP id h2mr3878954qto.154.1602086704217; Wed, 07 Oct 2020 09:05:04 -0700 (PDT) Received: from vhost2 (CPE001143542e1f-CMf81d0f809fa0.cpe.net.cable.rogers.com. [99.230.38.42]) by smtp.gmail.com with ESMTPSA id 11sm771793qkc.91.2020.10.07.09.05.03 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Oct 2020 09:05:03 -0700 (PDT) From: Noam Postavsky To: Corwin Brust Subject: Re: bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch* References: <85mu0yxdil.fsf@gmail.com> Date: Wed, 07 Oct 2020 12:05:01 -0400 In-Reply-To: (Corwin Brust's message of "Wed, 7 Oct 2020 10:30:47 -0500") Message-ID: <85k0w2xbrm.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43847 Cc: 43847@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I hope an ERC user will follow up (I think Bandali was going over ERC patches at some point?), but just some general comments: > diff -u "c:/emacs/share/emacs/27.1/lisp/erc/erc.el-27.1" "c:/emacs/share/emacs/27.1/lisp/erc/erc.el" > +(defun erc-yank (&optional arg) > + "Unfill then yank. ARG is handled by `yank', which see." > + (interactive) > + (insert > + (save-excursion I believe the save-excursion is redundant since all the movement happens inside a temp buffer. > + (with-temp-buffer > + (yank arg) > + (goto-char (point-min)) > + (let ((fill-column (point-max)) > + (emacs-lisp-docstring-fill-column t)) I don't think binding emacs-lisp-docstring-fill-column should be needed? > + (fill-paragraph)) The TAB character should be spaces instead. I recommend (setq-default indent-tabs-mode nil), or at least (defun my-lisp-mode-hook () (setq-local indent-tabs-mode nil)) (add-hook 'emacs-lisp-mode-hook #'my-lisp-mode-hook) Note that if you edit the git repo, it comes with an indent-tabs-mode=nil setting for emacs-lisp-mode in .dir-locals.el. > + (buffer-string))))) From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 07 12:56:17 2020 Received: (at 43847) by debbugs.gnu.org; 7 Oct 2020 16:56:17 +0000 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 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 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 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 From: Brett Gilio To: Corwin Brust Subject: Re: bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch* In-Reply-To: (Corwin Brust's message of "Wed, 7 Oct 2020 09:11:48 -0500") References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Date: Wed, 07 Oct 2020 11:56:02 -0500 Message-ID: <87sgaqgel9.fsf@debian> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43847 Cc: 43847@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 08 21:33:13 2020 Received: (at 43847) by debbugs.gnu.org; 9 Oct 2020 01:33:13 +0000 Received: from localhost ([127.0.0.1]:33530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQhHV-0000gq-5E for submit@debbugs.gnu.org; Thu, 08 Oct 2020 21:33:13 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:38430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQhHT-0000gd-88 for 43847@debbugs.gnu.org; Thu, 08 Oct 2020 21:33:12 -0400 Received: by mail-ed1-f65.google.com with SMTP id i5so7746941edr.5 for <43847@debbugs.gnu.org>; Thu, 08 Oct 2020 18:33:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9uXH2uQghHOfE0w13Ym5EM4BLirknqdv8QrzrEPAOBg=; b=Z/a2+/rUFkumgHDCndXWvnRVxgaE4muGQUNyNS1OAgl5V9Zwl6NElNmbHACxa9i2Vd 315Aro1++LTnYBXw1rr/WXdPjSEe7jzbGDT3+5cwXGd5ApNVZ75UcW+5SD2Cnbk5gbrY edU+Ta/Krg5GOUubRZQ1H4ElaWhf9G4Ts8o+kNCHbJHzMZnafw7c+bxhJiPiAkkCc5np +Ow061vpKTSHhT3CtHQ1gz3+5PBd+eu6lA75D+FPSgHfY1NExKHC71RrzJiVjytKvYwz 7r/2954UrSrSGdl8fYbiDiI+c5jepALrlqZXN4MDFxw3crPYlVM2E1obSnUziUnFfp2O fibA== X-Gm-Message-State: AOAM5339qINPTYZPn4iWuJnflBBWwaRj0HpsX+lRnw+9tSVNJuQIwcMW B+7CDzDXu5sDlEpOKHPU+TroBmyEK5iIaAI6ukKE2Sfr+6vPWg== X-Google-Smtp-Source: ABdhPJyXzvZ5OhT/4tMDbJidEd9p3pOhWPh3p0RikTrGSBvwfHKRiU/cWj8kvRUH/bltO+hJrLgGY8kwXJn4egzP3BE= X-Received: by 2002:a05:6402:1446:: with SMTP id d6mr12045909edx.244.1602207185378; Thu, 08 Oct 2020 18:33:05 -0700 (PDT) MIME-Version: 1.0 References: <87sgaqgel9.fsf@debian> In-Reply-To: <87sgaqgel9.fsf@debian> From: Corwin Brust Date: Thu, 8 Oct 2020 20:32:54 -0500 Message-ID: Subject: Re: bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch* To: Brett Gilio Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 43847 Cc: 43847@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi Brett! Thanks so much for the reply! On Wed, Oct 7, 2020 at 11:56 AM Brett Gilio wrote: > > 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. This is a wonderful suggestion. Speaking for myself, personally, I'd like to see it as somewhat of a secondary behavior, what sending a prefix arg does, or something. In any case a very fine feature, indeed. A quick perusal of CIRCE[1] (which looks lovely), suggests the present approach there involves having various paste-services explicitly supported. Perhaps this could be implemented in terms of a def-paste-service macro, of some sort. I would expect some amount of discussion may be involved in selecting an initial service or services to support, as it were, of the the box. Maybe that conversation would be approprite to Emacs devel, in case this feature would be interesting to a more general cross-section of users vs ERC/IRC. > What if we had a paste.emacs.org that ERC could utilize here? I think that's an excellet idea in several regards. In addition to simplifying, potentially trivializing the decision of what service to support, it also leads to a bunch of links getting shared around which point into the fsfverse. It's a tiny bit of mind-share, but I'd be inclined to take it. That said, having a "branded" paste-service "baked in" to Emacs would seem to me to stengthen the argument to formalize the interface for people to setup their own; to make ours easy and others hard would be very off-brand. This is something I'd be happy to work on, but I'm not how we would approach something like requesting a http facing new service, going forward. > Just a thought. As I hope I made clear, I love it. I'm tempted tho, to suggest we might move forward with my more trival suggested change in the mean-time. It seems like having something special at C-y in `erc-mode' is probably on the road-map for any of this, and may make live easier for ERC users somewhat more quickly than some of the other ideas discussed so far can move. > > Brett Gilio Regards, Corwin From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 08 22:00:09 2020 Received: (at 43847) by debbugs.gnu.org; 9 Oct 2020 02:00:10 +0000 Received: from localhost ([127.0.0.1]:33570 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQhhZ-0001NP-Md for submit@debbugs.gnu.org; Thu, 08 Oct 2020 22:00:09 -0400 Received: from mail-ej1-f41.google.com ([209.85.218.41]:44040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQhhW-0001Ll-UT for 43847@debbugs.gnu.org; Thu, 08 Oct 2020 22:00:08 -0400 Received: by mail-ej1-f41.google.com with SMTP id a3so10776349ejy.11 for <43847@debbugs.gnu.org>; Thu, 08 Oct 2020 19:00:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=W7kxVh6njMJ3NGW5dIZdZ1ksy5HtCIwro+iCgZ7jeGU=; b=Mrwyjfwjif2M7wO1P41K9KfEuVYXMe9N9BzH+35aQaKfVkIVZ/bvojAkSfgWCOtlG3 s4MgzwE7EmhE0WbYK6ckZwYlBd9HYBYugxY7pWLqoUhEpxVvxWN3tMbYvz9Xchuj1CXT dxWzKrfOfeILPALM/h81lnPzFibuNWerrQgbEb8M1iLt1IKju9ITF+WUC1JgFilC1dmI FZzDYhfJz+NR0KN6d6JlXjrWJk4M6bUR19lah8BIi3tNRNVIZEANrxfWdvhgnKVu2WK5 yhxOMMW0W91sx/LVVXyBLg/JV5Ibd4MiHhF1XE0ur6KjTbQQrPHzjJis0tq/lHHUHUlV TnOQ== X-Gm-Message-State: AOAM532OdXIt1Z2VC8n53VtpQnVnhQWYclj4DWu4S4c/Ji/tqTgZTB4W TT6hxbR15CKDvn3LwUOtm/RT5QmKndx2Y74I6Nc= X-Google-Smtp-Source: ABdhPJx4JhZYEnU3YNPm67/URsyjdIBXz7V3xD3ZixcyvTmIQN5Q4mbStupfyk7vDTKvDJFalxsMVSy4NtxiJbyeES4= X-Received: by 2002:a17:906:17c6:: with SMTP id u6mr11940062eje.95.1602208800990; Thu, 08 Oct 2020 19:00:00 -0700 (PDT) MIME-Version: 1.0 References: <87sgaqgel9.fsf@debian> In-Reply-To: From: Corwin Brust Date: Thu, 8 Oct 2020 20:59:49 -0500 Message-ID: Subject: Re: bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch* To: Brett Gilio Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 43847 Cc: 43847@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi again. On Thu, Oct 8, 2020 at 8:32 PM Corwin Brust wrote: > > > A quick perusal of CIRCE[1] (which looks lovely), suggests the present I see that I forgot the link for the source I looked at. Here it is: [1] https://github.com/jorgenschaefer/circe/blob/master/lui-autopaste.el Corwin From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 08 22:01:38 2020 Received: (at 43847) by debbugs.gnu.org; 9 Oct 2020 02:01:38 +0000 Received: from localhost ([127.0.0.1]:33574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQhj0-0001Pn-26 for submit@debbugs.gnu.org; Thu, 08 Oct 2020 22:01:38 -0400 Received: from mail-ed1-f47.google.com ([209.85.208.47]:33941) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQhiy-0001Pb-94 for 43847@debbugs.gnu.org; Thu, 08 Oct 2020 22:01:36 -0400 Received: by mail-ed1-f47.google.com with SMTP id x1so7792692eds.1 for <43847@debbugs.gnu.org>; Thu, 08 Oct 2020 19:01:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4FxytFT808NbtC9UecGY1gEE7LMzR5iLwiBjLR1lMk4=; b=LIk8RXsRRZYzCgKVWZq8OhlRnJbnCAOODU5A81paY2oiM8EI6uT8WMusESff+lkWTW YHbu/aEjxdKuRFKZnRdBJy3ucqwDy3fmNvOe/fv3t6KM+xOFuY/4Ru5u0IrSZJPOiynV 0f1S4+P2YDOyw3SWtUn6Kc26kjDxo8jFMz3aPKjW59thR903ZhtN/Ptvp7I3tQoWYNt/ ZCRBQHyPN4KvGTlisH7M2ts0cOogCV9M1NWeSoHncD0Eas+QsKXVm+UfnSlrccvO+94i Fbeu0eLrIAu5+58ZPIaHbVV0f7uPG/H/ofVsZtEYKs6BNoCVXTIgzHVSddeueQKxIGjS R4NA== X-Gm-Message-State: AOAM531WRFm/C/mwEezalkPdKfCnyP+1NK1/Vlr16IZTOKUm2BRwtH4H un7V+00j9bnp64nK2KtM5OFrhBdNSVfgE65W1/g= X-Google-Smtp-Source: ABdhPJwfjDqalptHKpylitYEqjh/Qn/ICc1Ja57DJJ6/eJv8AKgj/e+CMf38qaWkuIy3L4dhfBf/76dqLaLhmOJgMFE= X-Received: by 2002:aa7:c608:: with SMTP id h8mr11907163edq.16.1602208890409; Thu, 08 Oct 2020 19:01:30 -0700 (PDT) MIME-Version: 1.0 References: <85mu0yxdil.fsf@gmail.com> <85k0w2xbrm.fsf@gmail.com> In-Reply-To: <85k0w2xbrm.fsf@gmail.com> From: Corwin Brust Date: Thu, 8 Oct 2020 21:01:19 -0500 Message-ID: Subject: Re: bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch* To: Noam Postavsky Content-Type: multipart/mixed; boundary="000000000000c5055405b13353c5" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 43847 Cc: 43847@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --000000000000c5055405b13353c5 Content-Type: text/plain; charset="UTF-8" Many thanks, Noam. On Wed, Oct 7, 2020 at 11:05 AM Noam Postavsky wrote: > > I hope an ERC user will follow up (I think Bandali was going over ERC > patches at some point?), but just some general comments: I'm hoping Bandali and other ERC users will look, also. I spoke to someone on ERC today who is using the (prior version), I believe and has agreed to mention any issues or suggestions. (They agreed with you about e-l-d-f-c being irrelevant, which seems pretty darned obvious to me now too.) > > diff -u "c:/emacs/share/emacs/27.1/lisp/erc/erc.el-27.1" "c:/emacs/share/emacs/27.1/lisp/erc/erc.el" > > > +(defun erc-yank (&optional arg) > > + "Unfill then yank. ARG is handled by `yank', which see." > > + (interactive) > > + (insert > > + (save-excursion > > I believe the save-excursion is redundant since all the movement happens > inside a temp buffer. Removed save-excursion, thank you. > > > + (with-temp-buffer > > + (yank arg) > > + (goto-char (point-min)) > > + (let ((fill-column (point-max)) > > + (emacs-lisp-docstring-fill-column t)) > > I don't think binding emacs-lisp-docstring-fill-column should be needed? *Smacking of forehead* Right you are. > > + (fill-paragraph)) > > The TAB character should be spaces instead. I recommend (setq-default > indent-tabs-mode nil), or at least > > (defun my-lisp-mode-hook () > (setq-local indent-tabs-mode nil)) > (add-hook 'emacs-lisp-mode-hook #'my-lisp-mode-hook) > > Note that if you edit the git repo, it comes with an indent-tabs-mode=nil > setting for emacs-lisp-mode in .dir-locals.el. > > > + (buffer-string))))) I'm pulling master now. This version was created after evaling your suggested one-liner in my erc.el buffer & please let me know if that's got it. Again, thanks Corwin --000000000000c5055405b13353c5 Content-Type: application/octet-stream; name="erc-yank_002_rm_save-excusrion-and-elsip-docstring-col.patch" Content-Disposition: attachment; filename="erc-yank_002_rm_save-excusrion-and-elsip-docstring-col.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kg1lsnmz0 ZGlmZiAtdSAiYzovZW1hY3Mvc2hhcmUvZW1hY3MvMjcuMS9saXNwL2VyYy9lcmMuZWwtMjcuMSIg ImM6L2VtYWNzL3NoYXJlL2VtYWNzLzI3LjEvbGlzcC9lcmMvZXJjLmVsIg0KLS0tIGM6L2VtYWNz L3NoYXJlL2VtYWNzLzI3LjEvbGlzcC9lcmMvZXJjLmVsLTI3LjEJMjAyMC0xMC0wNyAwODoxMDoz NS4wMDAwMDAwMDAgLTA1MDANCisrKyBjOi9lbWFjcy9zaGFyZS9lbWFjcy8yNy4xL2xpc3AvZXJj L2VyYy5lbAkyMDIwLTEwLTA4IDIwOjQyOjI2LjIwNzY4NDEwMCAtMDUwMA0KQEAgLTExNTUsNiAr MTE1NSw3IEBADQogICAgIChkZWZpbmUta2V5IG1hcCAiXEMtYSIgJ2VyYy1ib2wpDQogICAgIChk ZWZpbmUta2V5IG1hcCBbaG9tZV0gJ2VyYy1ib2wpDQogICAgIChkZWZpbmUta2V5IG1hcCAiXEMt Y1xDLWEiICdlcmMtYm9sKQ0KKyAgICAoZGVmaW5lLWtleSBtYXAgIlxDLXkiICdlcmMteWFuaykN CiAgICAgKGRlZmluZS1rZXkgbWFwICJcQy1jXEMtYiIgJ2VyYy1zd2l0Y2gtdG8tYnVmZmVyKQ0K ICAgICAoZGVmaW5lLWtleSBtYXAgIlxDLWNcQy1jIiAnZXJjLXRvZ2dsZS1pbnRlcnByZXQtY29u dHJvbHMpDQogICAgIChkZWZpbmUta2V5IG1hcCAiXEMtY1xDLWQiICdlcmMtaW5wdXQtYWN0aW9u KQ0KQEAgLTQwODQsNiArNDA4NSwxNiBAQA0KICAgICAgICAgKHNldHEgZXJjLWlucHV0LXJpbmct aW5kZXggbmlsKSkNCiAgICAgKGtpbGwtbGluZSkpKQ0KIA0KKyhkZWZ1biBlcmMteWFuayAoJm9w dGlvbmFsIGFyZykNCisgICJVbmZpbGwgdGhlbiB5YW5rLiAgQVJHIGlzIGhhbmRsZWQgYnkgYHlh bmsnLCB3aGljaCBzZWUuIg0KKyAgKGludGVyYWN0aXZlKQ0KKyAgKHdpdGgtdGVtcC1idWZmZXIN CisgICAgKHlhbmsgYXJnKQ0KKyAgICAoZ290by1jaGFyIChwb2ludC1taW4pKQ0KKyAgICAobGV0 ICgoZml4LWNvbHVtbiAocG9pbnQtbWF4KSkpDQorICAgICAgKGZpbGwtcGFyYWdyYXBoKSkNCisg ICAgKGJ1ZmZlci1zdHJpbmcpKSkNCisNCiAoZGVmdW4gZXJjLWNvbXBsZXRlLXdvcmQtYXQtcG9p bnQgKCkNCiAgIChydW4taG9vay13aXRoLWFyZ3MtdW50aWwtc3VjY2VzcyAnZXJjLWNvbXBsZXRl LWZ1bmN0aW9ucykpDQogDQoNCkRpZmYgZmluaXNoZWQuICBUaHUgT2N0ICA4IDIwOjQzOjExIDIw MjANCg== --000000000000c5055405b13353c5-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 09 00:54:56 2020 Received: (at 43847) by debbugs.gnu.org; 9 Oct 2020 04:54:56 +0000 Received: from localhost ([127.0.0.1]:33904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQkQh-0007zV-Op for submit@debbugs.gnu.org; Fri, 09 Oct 2020 00:54:56 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQkQf-0007zG-3b for 43847@debbugs.gnu.org; Fri, 09 Oct 2020 00:54:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=hCYerOA4iJUJ+2UxmEPYD6m/RZ0L+1PGf4tgzoJWKA4=; b=lrAtHKS5LCg5X0g+7AnjWh5cFS 8XNcApQ9nUgqBivBYSBkCrcBcr+nhMbDKr87uJaYD1YmQ/eclqocjEQ/zinBtqos6rR+GAE6nT13A scX8LY2ke2U9iuNYHAUyeZyRstQuaZ+4HgZrvUglqzDTRgXdFdUyufTGQW2EjMasnHpw=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kQkQW-00087w-48; Fri, 09 Oct 2020 06:54:46 +0200 From: Lars Ingebrigtsen To: Corwin Brust Subject: Re: bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch* References: X-Now-Playing: Alva Noto and Ryuichi Sakamoto's _Vrioon_: "Duoon" Date: Fri, 09 Oct 2020 06:54:42 +0200 In-Reply-To: (Corwin Brust's message of "Wed, 7 Oct 2020 09:11:48 -0500") Message-ID: <87tuv43sod.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Corwin Brust writes: > I hate it when I accidentally paste multi-line text into ERC. I > *never* actually intend to do this. I sometimes want to, and sometimes I don't want to. I think it would be pretty surprising for users if we rebind `C-y' in this way. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43847 Cc: 43847@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Corwin Brust writes: > I hate it when I accidentally paste multi-line text into ERC. I > *never* actually intend to do this. I sometimes want to, and sometimes I don't want to. I think it would be pretty surprising for users if we rebind `C-y' in this way. I'm using a command that fixes whitespace and removes newlines from the kill ring, which is perhaps more generally useful. Let's see... (global-set-key [(hyper y)] (lambda () (interactive) (insert (with-temp-buffer (yank) (goto-char (point-min)) (while (re-search-forward "[\t\n ]+" nil t) (replace-match " ")) (goto-char (point-min)) (when (re-search-forward " +$" nil t) (replace-match "")) (buffer-string))))) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 09 03:53:09 2020 Received: (at submit) by debbugs.gnu.org; 9 Oct 2020 07:53:09 +0000 Received: from localhost ([127.0.0.1]:34029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQnDB-0002AO-6H for submit@debbugs.gnu.org; Fri, 09 Oct 2020 03:53:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:33588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQnD9-0002AG-Fi for submit@debbugs.gnu.org; Fri, 09 Oct 2020 03:53:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQnD8-0005ws-I7 for bug-gnu-emacs@gnu.org; Fri, 09 Oct 2020 03:53:06 -0400 Received: from static.214.254.202.116.clients.your-server.de ([116.202.254.214]:44556 helo=ciao.gmane.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQnD7-0000XZ-00 for bug-gnu-emacs@gnu.org; Fri, 09 Oct 2020 03:53:06 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1kQnD1-0007fq-6z for bug-gnu-emacs@gnu.org; Fri, 09 Oct 2020 09:52:59 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= Subject: Re: bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch* Date: Fri, 09 Oct 2020 09:52:53 +0200 Message-ID: <878scfj0oa.fsf@gmail.com> References: <87tuv43sod.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cancel-Lock: sha1:mwhKKv6xd+Kx4MMAVZRTAylxO/8= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/09 03:53:00 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: 3 X-Spam_score: 0.3 X-Spam_bar: / X-Spam_report: (0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) Lars Ingebrigtsen writes: > Corwin Brust writes: > >> I hate it when I accidentally paste multi-line text into ERC. I >> *never* actually intend to do this. > > I sometimes want to, and sometimes I don't want to. I think it would be > pretty surprising for users if we rebind `C-y' in this way. Seconded. I think a whitespace-fixing yank command could be useful in more situations than just ERC; OTOH I'd much rather keep C-y as a "reliably dumb" yank in all contexts, at least by default. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 09 10:32:44 2020 Received: (at 43847) by debbugs.gnu.org; 9 Oct 2020 14:32:44 +0000 Received: from localhost ([127.0.0.1]:35963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQtRs-00069D-K4 for submit@debbugs.gnu.org; Fri, 09 Oct 2020 10:32:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQtRq-000691-Uo for 43847@debbugs.gnu.org; Fri, 09 Oct 2020 10:32:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44289) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kQtRl-00079r-3r; Fri, 09 Oct 2020 10:32:37 -0400 Received: from [2605:6000:1a0d:48fb::8e5] (port=56466 helo=debian) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kQtRd-0000Ms-Kp; Fri, 09 Oct 2020 10:32:32 -0400 From: Brett Gilio To: Corwin Brust , bandali@gnu.org Subject: Re: bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch* References: <87sgaqgel9.fsf@debian> Date: Fri, 09 Oct 2020 09:32:21 -0500 In-Reply-To: (Corwin Brust's message of "Thu, 8 Oct 2020 20:32:54 -0500") Message-ID: <87k0vzo4ga.fsf@debian> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43847 Cc: 43847@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Corwin Brust writes: > > As I hope I made clear, I love it. > > I'm tempted tho, to suggest we might move forward with my more trival > suggested change in the mean-time. > Understood. I think it would be a great discussion to have with the ERC people to further compliment the proposed change for future? I cc'ed bandali to see what they think. Brett Gilio From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 09 11:41:46 2020 Received: (at 43847) by debbugs.gnu.org; 9 Oct 2020 15:41:46 +0000 Received: from localhost ([127.0.0.1]:36077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQuWg-0007tr-5A for submit@debbugs.gnu.org; Fri, 09 Oct 2020 11:41:46 -0400 Received: from mail-ej1-f49.google.com ([209.85.218.49]:40562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQuWd-0007tb-GI for 43847@debbugs.gnu.org; Fri, 09 Oct 2020 11:41:44 -0400 Received: by mail-ej1-f49.google.com with SMTP id p15so13707970ejm.7 for <43847@debbugs.gnu.org>; Fri, 09 Oct 2020 08:41:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=hi7MauzQJvuOcmTG914DW2+aklalnS4FTtDmLu6Hjkc=; b=cTJ5FKg/hCg1OUrZEeuDcNinES7X2iQhnXvx8iyEKsuL5gQ47moNZ50qT/lMls+g/N Z/lmD7LY2tfPchbiIv7kPRuSjIvHRCMbloggL9nu6gMK+46gJMI/U+XmhAtuqhWxazH+ hptMOP1m1uNaHBQOP0+xSYenamV7rCR/FBdRZXO6Gjow0uMLN9vuSvS3QOqoG9/SLpS3 ZyqknwoDHj0tbWNSBwCfrU/dq9mhh7DSBBjIpfsk4reRHfc8H4WMmetIJ1+Y9JVQJB4v 0079rUmTm0J2u/+OhkfcJ9EiVBoqZhQRzX7L2SVUpNJiBSotCORWrSREOaTUFe8HSGmN ibzw== X-Gm-Message-State: AOAM532N+psimEyq93YtGEtG61UkQInoDReZGSFZLJJMqpeRi2p9Pkf6 8U9EdiT/QaK01muw8o+/QJtYmLrImy6zsSeE9XA= X-Google-Smtp-Source: ABdhPJwgJJIJ6aZNqpjwZphJexLQx0N0itMc0UoMk0j7cSA1TQNg4HZa8O1GKYekuSY9Q6Q07Vt6WwVASx9xzjiqwHI= X-Received: by 2002:a17:906:340b:: with SMTP id c11mr14885287ejb.213.1602258097654; Fri, 09 Oct 2020 08:41:37 -0700 (PDT) MIME-Version: 1.0 References: <87tuv43sod.fsf@gnus.org> <878scfj0oa.fsf@gmail.com> In-Reply-To: <878scfj0oa.fsf@gmail.com> From: Corwin Brust Date: Fri, 9 Oct 2020 10:41:26 -0500 Message-ID: Subject: Re: bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch* To: =?UTF-8?Q?K=C3=A9vin_Le_Gouguec?= , Lars Ingebrigtsen Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 43847 Cc: 43847@debbugs.gnu.org, Amin Bandali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi K=C3=A9vin and Lars. CCd Amin on this one also :) On Fri, Oct 9, 2020 at 2:54 AM K=C3=A9vin Le Gouguec wrote: > > Lars Ingebrigtsen writes: > > > Corwin Brust writes: > > > >> I hate it when I accidentally paste multi-line text into ERC. I > >> *never* actually intend to do this. > > > > I sometimes want to, and sometimes I don't want to. I think it would b= e > > pretty surprising for users if we rebind `C-y' in this way. > > Seconded. I think a whitespace-fixing yank command could be useful in > more situations than just ERC; OTOH I'd much rather keep C-y as a > "reliably dumb" yank in all contexts, at least by default. > I mean, diversity, right :) This hasn't come up for me outside IRC/ERC, that I can recall, but it definitely does makes sense to me that people would want an easy way to strip new-lines when yanking in contexts out-side IRC. Any thoughts as to the approach for this? The first thing that occurs would be to have an additional var akin to `yank-handled-properties' and `yank-excluded-properties', perhaps `yank-unfilled'. This would change the behavior of `yank' when bound to a non-nil value. I guess we'd want a new function wrapping `yank' with the new var lexically bound to t. As for a default binding for this, I note that M-y doesn't seem to do anything helpful when not proceeded by a C-y. Maybe more special case logic there? That said, I opened this bug with the goal of making it realy easy to avoid accidental muli-line spaces when pasting into ERC. To double confirm, both of you are saying that it is a frequent use-case that you want to yank content including new-lines into erc-mode buffers? I'd really like to see something like a defcustom that can make the default behavior of C-y for ERC buffers less IRC surly. IMHO, making this default to t is more newbie friendly, while those who have a use-case for multi-line paste directly into ERC seem more likely to be those who will know how to set the var. (defcustom erc-yank-unfilled t "When non-nill, ERC unfills before inserting from the kill-ring.") (defun erc-yank (..) .. (let ((yank-unfilled erc-yank-unfilled)) .. )) Couple additional notes: - I need to respin this to use [rebind] (thanks to wgreenhouse from #erc) - I haven't written anything for News, which I suspect anything we would decide on will end-up reaching Thanks much, Corwin From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 09 12:00:31 2020 Received: (at 43847) by debbugs.gnu.org; 9 Oct 2020 16:00:31 +0000 Received: from localhost ([127.0.0.1]:36091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQuop-0008Oj-96 for submit@debbugs.gnu.org; Fri, 09 Oct 2020 12:00:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51762) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kQuom-0008OW-Nn for 43847@debbugs.gnu.org; Fri, 09 Oct 2020 12:00:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45893) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kQuoh-0000vT-28; Fri, 09 Oct 2020 12:00:23 -0400 Received: from [2605:6000:1a0d:48fb::8e5] (port=57122 helo=debian) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kQuod-0008Ch-VN; Fri, 09 Oct 2020 12:00:20 -0400 From: Brett Gilio To: Corwin Brust Subject: Re: bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch* References: <87tuv43sod.fsf@gnus.org> <878scfj0oa.fsf@gmail.com> Date: Fri, 09 Oct 2020 11:00:18 -0500 In-Reply-To: (Corwin Brust's message of "Fri, 9 Oct 2020 10:41:26 -0500") Message-ID: <87blhbo0dp.fsf@debian> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43847 Cc: 43847@debbugs.gnu.org, Lars Ingebrigtsen , Amin Bandali , =?utf-8?Q?K=C3=A9vin?= Le Gouguec X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Corwin Brust writes: > This hasn't come up for me outside IRC/ERC, that I can recall, but it > definitely does makes sense to me that people would want an easy way > to strip new-lines when yanking in contexts out-side IRC. Any thoughts > as to the approach for this? > After giving it more thought, perhaps a prefix arg is the correct way to go here. It would be enough that people would not experience a breaking change. Or, it could be such that ERC alerts in the echo buffer that you are about to send a multiline paste and ask if it should be sanitized? Brett Gilio From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 10 01:00:51 2020 Received: (at 43847) by debbugs.gnu.org; 10 Oct 2020 05:00:51 +0000 Received: from localhost ([127.0.0.1]:36772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kR6zy-00066Q-Vy for submit@debbugs.gnu.org; Sat, 10 Oct 2020 01:00:51 -0400 Received: from mail-ej1-f47.google.com ([209.85.218.47]:44425) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kR6zv-00066B-Pk for 43847@debbugs.gnu.org; Sat, 10 Oct 2020 01:00:49 -0400 Received: by mail-ej1-f47.google.com with SMTP id a3so15964822ejy.11 for <43847@debbugs.gnu.org>; Fri, 09 Oct 2020 22:00:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=DcEP74Wc5nHX5/BMLFOqYnjgvDVVZtQRx6G0PeVhkYg=; b=o/P2BEYhlt5D62j9IEHAHjuModm0V9CVCRMBhsKTR98KL7uR1i18BADhBUkfM3heLu Nfu8HnmrTuG/xyb4u4WjnQ7P8mfK85Am66y8q4icXssHnBGXCgRj1UHa4RTuNjakSdP1 OKR3IA9oF2B2vMbBFsBdLSlxTd64pgx1MYwhJGMqskUwhDWYbEyrlnh6kIYbhlr2liQp yqs4tqmp6+oUHm61XF1W1It8TaTuyoZultFCoGdunbWRm+C4XE/S3XBzPoQsz1VHpGPx h66+DGKdi7/yQR0S9NxBjP6ye0QVFh1f3ACIgI3CfzPZIjf+ekplB+PpB37bKr3zC6PS 6uDw== X-Gm-Message-State: AOAM531Vd+9bhddWTbSV93kmvK2ZvT+Z3DV2S8BiMpFlOkc7eCmfQ4sH Kcrwf0+E2tgB0ISSq853OKcAIm19JSTF5hGuQTM= X-Google-Smtp-Source: ABdhPJz/RPfIoeIP1aDs9zjHg9SbWfx7AJWAWyoOGYWh4oGqIeGS8uaOe1HXVSYAfZS1CPgreXWlE9yxfhZz82GzIU8= X-Received: by 2002:a17:906:340b:: with SMTP id c11mr17729885ejb.213.1602306041960; Fri, 09 Oct 2020 22:00:41 -0700 (PDT) MIME-Version: 1.0 References: <85mu0yxdil.fsf@gmail.com> <85k0w2xbrm.fsf@gmail.com> In-Reply-To: From: Corwin Brust Date: Sat, 10 Oct 2020 00:00:31 -0500 Message-ID: Subject: Re: bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch* To: Noam Postavsky Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 43847 Cc: 43847@debbugs.gnu.org, Amin Bandali X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) If you are using this patch please ROLLBACK. =F0=9F=98=8A On Thu, Oct 8, 2020 at 9:01 PM Corwin Brust wrote: > > Many thanks, Noam. > > On Wed, Oct 7, 2020 at 11:05 AM Noam Postavsky wrote= : > > > > I hope an ERC user will follow up (I think Bandali was going over ERC > > patches at some point?), but just some general comments: > > I'm hoping Bandali and other ERC users will look, also. [...] This has unpleasant results when the point is not immediately after the ERC prompt, and likely in other cases I haven't found. For a next pass I plan to: * use `erc-display-line' instead of `insert' * remove the new binding while we discuss ideal approaches * create from master and see if I can I get tabs/spaces correct * CC emacs-erc in hopes of soliciting more inputs Thanks to Amin and others for discussions on IRC this evening. Regards Corwin From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 10 16:12:16 2020 Received: (at 43847) by debbugs.gnu.org; 10 Oct 2020 20:12:16 +0000 Received: from localhost ([127.0.0.1]:38633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRLDz-0007oK-QS for submit@debbugs.gnu.org; Sat, 10 Oct 2020 16:12:16 -0400 Received: from quimby.gnus.org ([95.216.78.240]:52956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRLDx-0007o5-GJ for 43847@debbugs.gnu.org; Sat, 10 Oct 2020 16:12:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=J01CeQxqcePb9PmhqAHjtaMR1t0qwrYS9hRRTBYAg6k=; b=mdBjAQI6/LHjgUmKGBlWEItIP2 piGcQp7v4ukIrfsN45rXrYyuT6qNGjoNprdeNUBhNoyszNnRt0x2Ec9JymLJN5VTlLB/guEC5Prp5 J/DlagrLQA5VVXMdq9kTdEe6O7XsOQ7HkR/ZkTdwamCxtzjkCqMqa7y6kMV6kiG6tcNI=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kRLDk-000689-Ok; Sat, 10 Oct 2020 22:12:06 +0200 From: Lars Ingebrigtsen To: Brett Gilio Subject: Re: bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch* References: <87tuv43sod.fsf@gnus.org> <878scfj0oa.fsf@gmail.com> <87blhbo0dp.fsf@debian> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAHlBMVEV2cHKUjYyEfoCh m5lYUlJBPDwZFhaCe32FgH3///8F2ZJAAAAAAWJLR0QJ8dml7AAAAAd0SU1FB+QKChMuMFeyL1gA AAGqSURBVDjLtdIxr5swEADgqwR4jeOXxxwW1lj07UbPZk4lzPwqYXd1o0j+B/3dPTsJHGnWekDg z3enOwPf+It15Ht4Cbj+PxxXEEbi8/QjfzQNgSHtTT/T+75tmjVV5Tk/+BzRxguBd/+J2OP5JsRI wTF7TcATHAn0k/91uEfQVPzDe98zvt9HAApiQPjCLDECozXEhDDvWLy0AASExH3vAksRFPgpgce9 Z/ieQSXBGu0CcgEWMz7BGQEoCPnxAPgXpgUwXf8ofhjHwtoVPhfQunwJ72dt7DTDvcgKf2bj3eQA Ao0QOEM3eOftM0gcrkbQN1hSCcEHP9sJgdUUug7v21ucOzAW1lTiBvdhkRpY4gGjotDJjpc51R1g AckL7xJYvYngsi7dOFrrjVFrhBBSvhk3am291mpTg5+uZzxWYOeaRnSyfvuCOoLZQic4lHmwg6LQ 4USgwKYj2wK2x8N1TjddKSDFE7Crg1iHaswAlxvgffzeIbShmhWBvHZOsSZWLkMgV7vzmmGE28wK UyGMrIXSafX0MwTvVARtbgAPOPU4XQXFaHIbEP4C9tKtFFmXn98AAAAldEVYdGRhdGU6Y3JlYXRl ADIwMjAtMTAtMTBUMTk6NDY6NDgrMDA6MDD+pT4xAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTEw LTEwVDE5OjQ2OjQ4KzAwOjAwj/iGjQAAAABJRU5ErkJggg== X-Now-Playing: David Sylvian's _Sleepwalkers_: "Pure Genius" Date: Sat, 10 Oct 2020 22:11:59 +0200 In-Reply-To: <87blhbo0dp.fsf@debian> (Brett Gilio's message of "Fri, 09 Oct 2020 11:00:18 -0500") Message-ID: <87d01p3kog.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Brett Gilio writes: > Corwin Brust writes: >> This hasn't come up for me outside IRC/ERC, that I can recall, but it >> definitely does makes sense to me that people would want an easy way >> to strip new- [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43847 Cc: 43847@debbugs.gnu.org, Corwin Brust , Amin Bandali , =?utf-8?Q?K=C3=A9vin?= Le Gouguec X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Brett Gilio writes: > Corwin Brust writes: >> This hasn't come up for me outside IRC/ERC, that I can recall, but it >> definitely does makes sense to me that people would want an easy way >> to strip new-lines when yanking in contexts out-side IRC. Any thoughts >> as to the approach for this? I think a new command, like `yank-trim-whitespace', might be nice. I have no idea where I'd put something like that in the global keymap, which is why I've never proposed it... But we could put it somewhere in the erc keymap for sure. > After giving it more thought, perhaps a prefix arg is the correct way to > go here. It would be enough that people would not experience a breaking > change. Or, it could be such that ERC alerts in the echo buffer that you > are about to send a multiline paste and ask if it should be sanitized? That sounds nice... doesn't erc already have an (optional) way of warning against multi-line yanks? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 10 16:23:20 2020 Received: (at 43847) by debbugs.gnu.org; 10 Oct 2020 20:23:20 +0000 Received: from localhost ([127.0.0.1]:38645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRLOT-00084k-Fd for submit@debbugs.gnu.org; Sat, 10 Oct 2020 16:23:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRLOR-000842-E5 for 43847@debbugs.gnu.org; Sat, 10 Oct 2020 16:23:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42147) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRLOL-00050J-RW; Sat, 10 Oct 2020 16:22:57 -0400 Received: from [2605:6000:1a0d:48fb::8e5] (port=33382 helo=debian) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kRLOK-0008Na-Tj; Sat, 10 Oct 2020 16:22:57 -0400 From: Brett Gilio To: Lars Ingebrigtsen Subject: Re: bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch* In-Reply-To: <87d01p3kog.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 10 Oct 2020 22:11:59 +0200") References: <87tuv43sod.fsf@gnus.org> <878scfj0oa.fsf@gmail.com> <87blhbo0dp.fsf@debian> <87d01p3kog.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Date: Sat, 10 Oct 2020 15:22:55 -0500 Message-ID: <87mu0tg7a8.fsf@debian> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43847 Cc: 43847@debbugs.gnu.org, Corwin Brust , Amin Bandali , =?utf-8?Q?K=C3=A9vin?= Le Gouguec X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > > That sounds nice... doesn't erc already have an (optional) way of > warning against multi-line yanks? Perhaps that is what `erc-toggle-flood-control' is. https://www.gnu.org/software/emacs/manual/html_mono/erc.html#Concept-Index Brett Gilio