From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#43847: ERC - prevent yanking multiple lines into IRC (feature request) *patch* Date: Wed, 07 Oct 2020 12:05:01 -0400 Message-ID: <85k0w2xbrm.fsf@gmail.com> References: <85mu0yxdil.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37576"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) 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 18:18:27 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 1kQC93-0009e1-9m for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Oct 2020 18:18:25 +0200 Original-Received: from localhost ([::1]:55026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kQC92-0004jF-9M for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Oct 2020 12:18:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35642) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQBx6-00089w-IW for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2020 12:06:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46251) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kQBx4-0002PK-Vq for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2020 12:06:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kQBx4-0007Xa-Q3 for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2020 12:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Oct 2020 16:06: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.160208671328911 (code B ref 43847); Wed, 07 Oct 2020 16:06:02 +0000 Original-Received: (at 43847) by debbugs.gnu.org; 7 Oct 2020 16:05:13 +0000 Original-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 Original-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 Original-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) Original-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) In-Reply-To: (Corwin Brust's message of "Wed, 7 Oct 2020 10:30:47 -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:190042 Archived-At: 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)))))