all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emanuel Berg <incal@dataswamp.org>
To: 68401@debbugs.gnu.org
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	[thread overview]
Message-ID: <8734v2ugqm.fsf@dataswamp.org> (raw)
In-Reply-To: <87v87yvnly.fsf@dataswamp.org>

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-all.patch --]
[-- Type: text/x-diff, Size: 4551 bytes --]

From a2345b8eb22af2d5a052c1e22a19aeffc48544b2 Mon Sep 17 00:00:00 2001
From: Emanuel Berg <incal@dataswamp.org>
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 <incal@dataswamp.org>
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


[-- Attachment #3: Type: text/plain, Size: 61 bytes --]


-- 
underground experts united
https://dataswamp.org/~incal

  reply	other threads:[~2024-01-13  2:09 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87v87yvnly.fsf@dataswamp.org>
2024-01-12 12:08 ` bug#68401: 30.0.50; ERC 5.6-git: `erc-cmd-GMSG', `erc-cmd-AMSG', `erc-cmd-GME', `erc-cmd-AME'. 2nd attempt Eli Zaretskii
2024-01-12 14:12   ` Emanuel Berg
2024-01-12 14:39     ` Eli Zaretskii
2024-01-13  2:09       ` Emanuel Berg [this message]
2024-01-13  2:31         ` Emanuel Berg
2024-01-13  2:45           ` Emanuel Berg
2024-01-13  7:23           ` Eli Zaretskii
2024-01-14  9:11             ` Emanuel Berg
     [not found] ` <834jfikb4d.fsf@gnu.org>
2024-01-12 12:36   ` Emanuel Berg
     [not found]   ` <87ply6vidl.fsf@dataswamp.org>
2024-01-12 14:03     ` Eli Zaretskii
2024-01-12 14:30       ` Emanuel Berg
     [not found]   ` <87mstavias.fsf@dataswamp.org>
     [not found]     ` <87wmseoskl.fsf@dataswamp.org>
2024-01-19  2:58       ` J.P.
2024-01-22 10:18         ` Emanuel Berg
2024-01-22 15:11           ` J.P.
2024-01-22 17:00             ` Emanuel Berg
2024-01-22 19:23               ` Emanuel Berg
     [not found]                 ` <87y1ch851b.fsf@igel.home>
2024-01-22 21:05                   ` Emanuel Berg
2024-01-22 21:27                 ` J.P.
2024-01-23  4:25                   ` Emanuel Berg
2024-01-23  4:32                     ` Emanuel Berg
2024-01-23  6:20                       ` Emanuel Berg
2024-01-23 13:31                         ` Emanuel Berg
2024-01-24  0:36                           ` J.P.
2024-01-24  0:56                             ` Emanuel Berg
2024-01-24  1:38                               ` J.P.
2024-01-24  2:01                                 ` Emanuel Berg
2024-01-23 13:42         ` Emanuel Berg
2024-01-24  0:34           ` J.P.
2024-01-24  1:28             ` Emanuel Berg
2024-01-24  1:38               ` Emanuel Berg
2024-01-24 11:15               ` Emanuel Berg
2024-01-24 11:55                 ` Emanuel Berg
2024-02-05  0:52                   ` Emanuel Berg
2024-02-06  3:44                     ` J.P.
2024-02-11  1:58                       ` Emanuel Berg
2024-02-11  2:27                       ` Emanuel Berg
2024-02-11  3:30                         ` Emanuel Berg
2024-02-11  3:52                           ` Emanuel Berg
2024-02-14  1:42                             ` J.P.
2024-02-17  5:21                               ` Emanuel Berg
2024-02-17  8:52                               ` Emanuel Berg
2024-02-21  1:11                                 ` J.P.
     [not found]                                 ` <87ttm2boza.fsf@neverwas.me>
2024-02-21  1:16                                   ` Emanuel Berg
2024-03-01  0:18                                     ` J.P.
2024-01-12 10:43 Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8734v2ugqm.fsf@dataswamp.org \
    --to=incal@dataswamp.org \
    --cc=68401@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.