discussion and development of piem
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: piem@inbox.kyleam.com
Subject: [PATCH 3/4] piem-am-ready-mbox: Change spelling of inserted message ID header
Date: Sun, 30 Apr 2023 18:15:51 -0400	[thread overview]
Message-ID: <20230430221552.251335-4-kyle@kyleam.com> (raw)
In-Reply-To: <20230430221552.251335-1-kyle@kyleam.com>

format-patch changed from Message-Id to Message-ID in git.git's
ba4324c4e1 (e-mail workflow: Message-ID is spelled with ID in both
capital letters, 2023-04-03).  Update piem--insert-message-id-header
to follow Git's change.
---
 piem.el             | 6 +++---
 tests/piem-tests.el | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/piem.el b/piem.el
index 9dc7f3e3..01985f0e 100644
--- a/piem.el
+++ b/piem.el
@@ -156,10 +156,10 @@ (defcustom piem-am-ready-mbox-functions nil
   :type 'hook)
 
 (defcustom piem-add-message-id-header nil
-  "Whether to add Message-Id header to non-mail patches.
+  "Whether to add Message-ID header to non-mail patches.
 If this value is non-nil and a patch returned by a function in
 `piem-am-ready-mbox-functions' looks like a patch that was
-attached rather than sent inline, add a Message-Id header with
+attached rather than sent inline, add a Message-ID header with
 the return value of `piem-mid'."
   :type 'boolean)
 
@@ -615,7 +615,7 @@ (defun piem--insert-message-id-header (mid)
           (when (= header-count 3)
             ;; Found all the expected headers before hitting a
             ;; blank line.  Assume we're in a header.
-            (insert (format "Message-Id: <%s>\n" mid))))))))
+            (insert (format "Message-ID: <%s>\n" mid))))))))
 
 (defun piem-am-ready-mbox (&optional buffer-name)
   "Generate a buffer containing an am-ready mbox.
diff --git a/tests/piem-tests.el b/tests/piem-tests.el
index 6f39a53e..7f9f30f3 100644
--- a/tests/piem-tests.el
+++ b/tests/piem-tests.el
@@ -181,7 +181,7 @@ (ert-deftest piem--insert-message-id-header ()
      (piem--insert-message-id-header "msg@id")))
   (should-not
    (string-match-p
-    "Message-Id: <msg@id>"
+    "Message-ID: <msg@id>"
     (with-temp-buffer
       (insert "\
 From 0d732713af1f3fb48b37430e2cd0a3033cea14f3 Mon Sep 17 00:00:00 2001
@@ -200,9 +200,9 @@ (ert-deftest piem--insert-message-id-header ()
   (should
    (string-match-p
     (concat
-     (rx "Subject: [PATCH 1/2] a\nMessage-Id: <msg@id>\n"
+     (rx "Subject: [PATCH 1/2] a\nMessage-ID: <msg@id>\n"
          (one-or-more anychar)
-         "Subject: [PATCH 2/2] b\nMessage-Id: <msg@id>\n"))
+         "Subject: [PATCH 2/2] b\nMessage-ID: <msg@id>\n"))
     (with-temp-buffer
       (insert "\
 From 0d732713af1f3fb48b37430e2cd0a3033cea14f3 Mon Sep 17 00:00:00 2001
-- 
2.39.2


  parent reply	other threads:[~2023-04-30 22:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-30 22:15 [PATCH 0/4] Update for Git's Message-Id to Message-ID switch Kyle Meyer
2023-04-30 22:15 ` [PATCH 1/4] piem-b4-am-from-mid: Tweak docstring for consistency Kyle Meyer
2023-04-30 22:15 ` [PATCH 2/4] piem-am-ready-mbox: Adjust header regex for format-patch change Kyle Meyer
2023-05-01  0:22   ` Kyle Meyer
2023-04-30 22:15 ` Kyle Meyer [this message]
2023-05-01  0:34   ` [PATCH 3/4] piem-am-ready-mbox: Change spelling of inserted message ID header Kyle Meyer
2023-04-30 22:15 ` [PATCH 4/4] Switch remaining Message-Id headers to Message-ID Kyle Meyer

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

  List information: https://git.kyleam.com/

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

  git send-email \
    --in-reply-to=20230430221552.251335-4-kyle@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=piem@inbox.kyleam.com \
    /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 public inbox

	https://git.kyleam.com/piem/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).