From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.bugs Subject: bug#68401: 30.0.50; ERC 5.6-git: `erc-cmd-GMSG', `erc-cmd-AMSG', `erc-cmd-GME', `erc-cmd-AME'. 2nd attempt Date: Sat, 13 Jan 2024 03:09:05 +0100 Message-ID: <8734v2ugqm.fsf@dataswamp.org> References: <87v87yvnly.fsf@dataswamp.org> <834jfikb4d.fsf__6528.35318339697$1705061373$gmane$org@gnu.org> <87edemvdw6.fsf@dataswamp.org> <83mstaipk7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23481"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 68401@debbugs.gnu.org Cancel-Lock: sha1:xj51JyjyrrwWgn4Fe3TiocNnAvk= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 13 03:10:25 2024 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 1rOTTd-0005uX-Lu for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Jan 2024 03:10:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rOTTK-0000nX-HY; Fri, 12 Jan 2024 21:10:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rOTTH-0000mh-U8 for bug-gnu-emacs@gnu.org; Fri, 12 Jan 2024 21:10:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rOTTH-0006MB-Ic for bug-gnu-emacs@gnu.org; Fri, 12 Jan 2024 21:10:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rOTTF-0000e4-Oe for bug-gnu-emacs@gnu.org; Fri, 12 Jan 2024 21:10:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87v87yvnly.fsf@dataswamp.org> Resent-From: Emanuel Berg Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Jan 2024 02:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68401 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17051117782439 (code B ref -1); Sat, 13 Jan 2024 02:10:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Jan 2024 02:09:38 +0000 Original-Received: from localhost ([127.0.0.1]:38045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOTSr-0000dH-MF for submit@debbugs.gnu.org; Fri, 12 Jan 2024 21:09:38 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:37116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOTSp-0000d3-9B for submit@debbugs.gnu.org; Fri, 12 Jan 2024 21:09:36 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rOTSZ-0000kL-Rt for bug-gnu-emacs@gnu.org; Fri, 12 Jan 2024 21:09:20 -0500 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rOTSW-0005wb-1m for bug-gnu-emacs@gnu.org; Fri, 12 Jan 2024 21:09:19 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1rOTST-0004S9-67 for bug-gnu-emacs@gnu.org; Sat, 13 Jan 2024 03:09:13 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: bug-gnu-emacs@gnu.org Mail-Copies-To: never Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.248, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:278075 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii wrote: >> To create one patch out of all the commits? > > Yes, please. Maybe it can be done like this. $ git format-patch -2 HEAD --stdout > 0001-all.patch --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-all.patch >From a2345b8eb22af2d5a052c1e22a19aeffc48544b2 Mon Sep 17 00:00:00 2001 From: Emanuel Berg Date: Fri, 12 Jan 2024 11:37:28 +0100 Subject: [PATCH 1/2] `erc-cmd-GMSG', `erc-cmd-AMSG', `erc-cmd-GME', `erc-cmd-AME'. --- lisp/erc/erc.el | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 478683a77f5..06791bce520 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -4016,16 +4016,40 @@ erc--split-string-shell-cmd ;; Input commands handlers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defun erc-cmd-AMSG (line) - "Send LINE to all channels of the current server that you are on." - (interactive "sSend to all channels you're on: ") +(defun erc-cmd-GMSG (line) + "Send LINE to all channels on all networks you are on." + (interactive "sSend to all channels: ") (setq line (erc-trim-string line)) (erc-with-all-buffers-of-server nil - (lambda () - (erc-channel-p (erc-default-target))) + (lambda () (erc-channel-p (erc-default-target))) + (erc-send-message line))) +(put 'erc-cmd-GMSG 'do-not-parse-args t) + +(defun erc-cmd-AMSG (line) + "Send LINE to all channels of the current network." + (interactive "sSend to all channels on this network: ") + (setq line (erc-trim-string line)) + (erc-with-all-buffers-of-server erc-server-process + (lambda () (erc-channel-p (erc-default-target))) (erc-send-message line))) (put 'erc-cmd-AMSG 'do-not-parse-args t) +(defun erc-cmd-GME (line) + "Send LINE as an action to all channels on all networks you are on." + (interactive "sSend action to all channels: ") + (erc-with-all-buffers-of-server nil + (lambda () (erc-channel-p (erc-default-target))) + (erc-cmd-ME line) )) +(put 'erc-cmd-GME 'do-not-parse-args t) + +(defun erc-cmd-AME (line) + "Send LINE as an action to all channels on the current network." + (interactive "sSend action to all channels on this network: ") + (erc-with-all-buffers-of-server erc-server-process + (lambda () (erc-channel-p (erc-default-target))) + (erc-cmd-ME line) )) +(put 'erc-cmd-AME 'do-not-parse-args t) + (defun erc-cmd-SAY (line) "Send LINE to the current query or channel as a message, not a command. -- 2.39.2 >From 73f3cc5072bb8cc95ce5367cb8aef74e5b047f0d Mon Sep 17 00:00:00 2001 From: Emanuel Berg Date: Fri, 12 Jan 2024 15:03:10 +0100 Subject: [PATCH 2/2] Docstrings for interactive use. --- lisp/erc/erc.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 06791bce520..aeb7722b563 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -4017,7 +4017,8 @@ erc--split-string-shell-cmd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun erc-cmd-GMSG (line) - "Send LINE to all channels on all networks you are on." + "Send LINE to all channels on all networks you are on. +Interactively, prompt for the line of text to send." (interactive "sSend to all channels: ") (setq line (erc-trim-string line)) (erc-with-all-buffers-of-server nil @@ -4026,7 +4027,8 @@ erc-cmd-GMSG (put 'erc-cmd-GMSG 'do-not-parse-args t) (defun erc-cmd-AMSG (line) - "Send LINE to all channels of the current network." + "Send LINE to all channels of the current network. +Interactively, prompt for the line of text to send." (interactive "sSend to all channels on this network: ") (setq line (erc-trim-string line)) (erc-with-all-buffers-of-server erc-server-process @@ -4035,7 +4037,8 @@ erc-cmd-AMSG (put 'erc-cmd-AMSG 'do-not-parse-args t) (defun erc-cmd-GME (line) - "Send LINE as an action to all channels on all networks you are on." + "Send LINE as an action to all channels on all networks you are on. +Interactively, prompt for the line of text to send." (interactive "sSend action to all channels: ") (erc-with-all-buffers-of-server nil (lambda () (erc-channel-p (erc-default-target))) @@ -4043,7 +4046,8 @@ erc-cmd-GME (put 'erc-cmd-GME 'do-not-parse-args t) (defun erc-cmd-AME (line) - "Send LINE as an action to all channels on the current network." + "Send LINE as an action to all channels on the current network. +Interactively, prompt for the line of text to send." (interactive "sSend action to all channels on this network: ") (erc-with-all-buffers-of-server erc-server-process (lambda () (erc-channel-p (erc-default-target))) -- 2.39.2 --=-=-= Content-Type: text/plain -- underground experts united https://dataswamp.org/~incal --=-=-=--