From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Corwin Brust Newsgroups: gmane.emacs.bugs Subject: bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch* Date: Wed, 7 Oct 2020 09:11:48 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30234"; mail-complaints-to="usenet@ciao.gmane.io" To: 43847@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 07 16:13:13 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 1kQABt-0007mL-Jt for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Oct 2020 16:13:13 +0200 Original-Received: from localhost ([::1]:43424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kQABs-0004Ta-FH for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Oct 2020 10:13:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQABi-0004TS-I2 for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2020 10:13:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46089) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kQABi-0001wP-8f for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2020 10:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kQABi-0004dw-4G for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2020 10:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Corwin Brust Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Oct 2020 14:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43847 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160207992617778 (code B ref -1); Wed, 07 Oct 2020 14:13:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Oct 2020 14:12:06 +0000 Original-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 Original-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 Original-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 Original-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 Original-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) 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-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:190029 Archived-At: 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