From: Phillip Wood <phillip.wood123@gmail.com>
To: Collin Funk <collin.funk1@gmail.com>, Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org,
Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>,
Matthieu Moy <git@matthieu-moy.fr>,
Eric Sunshine <sunshine@sunshineco.com>,
Todd Zullinger <tmz@pobox.com>
Subject: Re: [PATCH v2 04/11] contrib: remove "thunderbird-patch-inline"
Date: Mon, 12 May 2025 14:02:43 +0100 [thread overview]
Message-ID: <a3aaa11a-a842-4c10-8189-07b681663573@gmail.com> (raw)
In-Reply-To: <87jz6mo4n9.fsf@gmail.com>
Hi Collin
On 12/05/2025 05:05, Collin Funk wrote:
> Hi,
>
> You said:
>
>> The "thunderbird-patch-inline" directory in "contrib/" contains a script
>> to send patch files via Thunderbird. This script depends on the
>> ExternalEditor extension [1], which seems to be effectively unmaintained
>> with the last update being in 2008. While the extension has eventually
>> been maintained in [2], that fork hasn't received any updates since
>> 2020, either.
>>
>> In addition, the script itself hasn't really seen a lot of maintenance
>> outside of a couple of global cleanups. It is quite unlikely that this
>> setup still works, and if it did it's even less likely that somebody
>> uses this script.
>
> FWIW, in case it helps any Thunderbird users, there is External Editor
> Revived which seems to work pretty well when I used Thunderbird [1].
Thanks for pointing that out. I noticed that extensional the other day
but had not got around to posting it.
> I think this script would be irrelevant with that extension though.
Users who want to post patches using thunderbird would still benefit
from the script. It needs tweaking to account for a different
separator between the headers and message body though. The patch below
does that.
Best Wishes
Phillip
---- >8 ----
From: Phillip Wood <phillip.wood@dunelm.org.uk>
Subject: [PATCH] contrib: update thunderbird-patch-inline
This script uses an extension to run an external editor from
thunderbird that is no-longer maintained. Replace it with a different
extension that is maintained[1]. The new extension uses a different
separator between the mail headers and message body so update the
script to accommodate that.
Signed-Off-By: Phillip Wood <phillip.wood@dunelm.org.uk>
[1] https://github.com/Frederick888/external-editor-revived
---
diff --git a/contrib/thunderbird-patch-inline/README b/contrib/thunderbird-patch-inline/README
index 000147bbe4a..aa00b379a60 100644
--- a/contrib/thunderbird-patch-inline/README
+++ b/contrib/thunderbird-patch-inline/README
@@ -1,6 +1,6 @@
-appp.sh is a script that is supposed to be used together with ExternalEditor
-for Mozilla Thunderbird. It will let you include patches inline in e-mails
-in an easy way.
+appp.sh is a script that is supposed to be used together with
+ExternalEditorRevived for Mozilla Thunderbird. It will let you include
+patches inline in e-mails in an easy way.
Usage:
- Generate the patch with git format-patch.
@@ -14,7 +14,7 @@ will be moved to the section between the --- and the diffstat.
All S-O-B:s and Cc:s in the patch will be added to the CC list.
-To set it up, just install External Editor and tell it to use appp.sh as the
-editor.
+To set it up, just install External Editor Revived and tell it to use
+appp.sh as the editor.
Zenity is a required dependency.
diff --git a/contrib/thunderbird-patch-inline/appp.sh b/contrib/thunderbird-patch-inline/appp.sh
index fdcc9483520..72c37aace4e 100755
--- a/contrib/thunderbird-patch-inline/appp.sh
+++ b/contrib/thunderbird-patch-inline/appp.sh
@@ -1,10 +1,12 @@
#!/bin/sh
# Copyright 2008 Lukas Sandström <luksan@gmail.com>
#
-# AppendPatch - A script to be used together with ExternalEditor
+# AppendPatch - A script to be used together with ExternalEditorRevived
# for Mozilla Thunderbird to properly include patches inline in e-mails.
-# ExternalEditor can be downloaded at http://globs.org/articles.php?lng=en&pg=2
+# ExternalEditorRevived extension can be installed using the Add-ons
+# manager in thunderbird, the source is available at
+# https://github.com/Frederick888/external-editor-revived
CONFFILE=~/.appprc
@@ -25,8 +27,12 @@ fi
cd - > /dev/null
+# The headers are separated from the message body by a blanks
+# line. However the message uses CR LF line ending so on platforms
+# where the native line ending is LF we see a line with a single CR.
+SEP="$(printf '^\r\\{0,1\\}$')"
SUBJECT=$(sed -n -e '/^Subject: /p' "${PATCH}")
-HEADERS=$(sed -e '/^'"${SEP}"'$/,$d' $1)
+HEADERS=$(sed -e "/${SEP}/"',$d' $1)
BODY=$(sed -e "1,/${SEP}/d" $1)
CMT_MSG=$(sed -e '1,/^$/d' -e '/^---$/,$d' "${PATCH}")
DIFF=$(sed -e '1,/^---$/d' "${PATCH}")
@@ -37,7 +43,7 @@ CCS=$(printf '%s\n%s\n' "$CMT_MSG" "$HEADERS" | sed -n -e 's/^Cc: \(.*\)$/\1,/gp
echo "$SUBJECT" > $1
echo "Cc: $CCS" >> $1
echo "$HEADERS" | sed -e '/^Subject: /d' -e '/^Cc: /d' >> $1
-echo "$SEP" >> $1
+echo >> $1
echo "$CMT_MSG" >> $1
echo "---" >> $1
next prev parent reply other threads:[~2025-05-12 13:02 UTC|newest]
Thread overview: 87+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 14:12 [PATCH 00/10] Spring cleanup of "contrib/" Patrick Steinhardt
2025-05-06 14:12 ` [PATCH 01/10] contrib: remove "remotes2config.sh" Patrick Steinhardt
2025-05-06 19:52 ` Junio C Hamano
2025-05-07 6:27 ` Patrick Steinhardt
2025-05-07 17:21 ` Junio C Hamano
2025-05-06 14:12 ` [PATCH 02/10] contrib: remove "examples" directory Patrick Steinhardt
2025-05-06 14:12 ` [PATCH 03/10] contrib: remove remote-helper stubs Patrick Steinhardt
2025-05-06 14:12 ` [PATCH 04/10] contrib: remove "thunderbird-patch-inline" Patrick Steinhardt
2025-05-06 14:12 ` [PATCH 05/10] contrib: remove "hooks" directory Patrick Steinhardt
2025-05-06 14:12 ` [PATCH 06/10] contrib: remove "mw-to-git" Patrick Steinhardt
2025-05-06 20:34 ` Junio C Hamano
2025-05-07 9:11 ` Matthieu Moy
2025-05-06 14:12 ` [PATCH 07/10] contrib: remove "persistent-https" remote helper Patrick Steinhardt
2025-05-06 20:25 ` Junio C Hamano
2025-05-06 14:12 ` [PATCH 08/10] contrib: remove "git-resurrect.sh" Patrick Steinhardt
2025-05-06 20:11 ` Junio C Hamano
2025-05-07 6:58 ` Patrick Steinhardt
2025-05-07 17:48 ` Junio C Hamano
2025-05-07 18:36 ` Kristoffer Haugsbakk
2025-05-06 14:12 ` [PATCH 09/10] contrib: remove "emacs" directory Patrick Steinhardt
2025-05-06 19:59 ` Junio C Hamano
2025-05-06 14:12 ` [PATCH 10/10] contrib: remove "git-new-workdir" Patrick Steinhardt
2025-05-06 19:57 ` Junio C Hamano
2025-05-07 6:27 ` Patrick Steinhardt
2025-05-07 17:25 ` Junio C Hamano
2025-05-09 7:53 ` Patrick Steinhardt
2025-05-06 20:43 ` [PATCH 00/10] Spring cleanup of "contrib/" Junio C Hamano
2025-05-06 22:51 ` Eric Sunshine
2025-05-07 1:32 ` Todd Zullinger
2025-05-07 3:55 ` Eric Sunshine
2025-05-07 6:27 ` Patrick Steinhardt
2025-05-10 20:07 ` D. Ben Knoble
2025-05-12 13:10 ` Phillip Wood
2025-05-09 9:17 ` [PATCH v2 00/11] " Patrick Steinhardt
2025-05-09 9:17 ` [PATCH v2 01/11] contrib: remove "remotes2config.sh" Patrick Steinhardt
2025-05-09 9:17 ` [PATCH v2 02/11] contrib: remove "examples" directory Patrick Steinhardt
2025-05-09 9:17 ` [PATCH v2 03/11] contrib: remove remote-helper stubs Patrick Steinhardt
2025-05-09 9:17 ` [PATCH v2 04/11] contrib: remove "thunderbird-patch-inline" Patrick Steinhardt
2025-05-09 9:17 ` [PATCH v2 05/11] contrib: remove "hooks" directory Patrick Steinhardt
2025-05-09 9:17 ` [PATCH v2 06/11] contrib: remove "mw-to-git" Patrick Steinhardt
2025-05-09 9:17 ` [PATCH v2 07/11] contrib: remove "persistent-https" remote helper Patrick Steinhardt
2025-05-09 9:17 ` [PATCH v2 08/11] contrib: remove "git-resurrect.sh" Patrick Steinhardt
2025-05-09 9:17 ` [PATCH v2 09/11] contrib: remove "emacs" directory Patrick Steinhardt
2025-05-09 9:17 ` [PATCH v2 10/11] contrib: remove "git-new-workdir" Patrick Steinhardt
2025-05-09 9:17 ` [PATCH v2 11/11] contrib: remove "stats" directory Patrick Steinhardt
2025-05-09 23:31 ` Elijah Newren
2025-05-09 23:53 ` [PATCH v2 00/11] Spring cleanup of "contrib/" Elijah Newren
2025-05-10 0:00 ` Junio C Hamano
2025-05-12 9:39 ` Patrick Steinhardt
2025-05-12 4:05 ` [PATCH v2 04/11] contrib: remove "thunderbird-patch-inline" Collin Funk
2025-05-12 13:02 ` Phillip Wood [this message]
2025-05-12 14:45 ` Patrick Steinhardt
2025-05-12 16:22 ` Junio C Hamano
2025-05-14 15:19 ` Phillip Wood
2025-05-16 13:53 ` [PATCH v2] contrib: update thunderbird-patch-inline Phillip Wood
2025-05-16 14:05 ` Kristoffer Haugsbakk
2025-05-19 5:38 ` Patrick Steinhardt
2025-05-19 5:50 ` Collin Funk
2025-05-19 14:21 ` Phillip Wood
2025-06-03 22:12 ` Junio C Hamano
2025-05-19 15:48 ` Junio C Hamano
2025-05-10 12:30 ` [PATCH 00/10] Spring cleanup of "contrib/" Peter Krefting
2025-05-12 9:19 ` [PATCH v3 00/11] " Patrick Steinhardt
2025-05-12 9:19 ` [PATCH v3 01/11] contrib: remove "remotes2config.sh" Patrick Steinhardt
2025-05-12 9:19 ` [PATCH v3 02/11] contrib: remove "examples" directory Patrick Steinhardt
2025-05-12 9:19 ` [PATCH v3 03/11] contrib: remove remote-helper stubs Patrick Steinhardt
2025-05-12 9:19 ` [PATCH v3 04/11] contrib: remove "thunderbird-patch-inline" Patrick Steinhardt
2025-05-16 22:49 ` Junio C Hamano
2025-05-26 8:47 ` Toon Claes
2025-06-04 14:45 ` Junio C Hamano
2025-05-12 9:19 ` [PATCH v3 05/11] contrib: remove "hooks" directory Patrick Steinhardt
2025-05-12 9:19 ` [PATCH v3 06/11] contrib: remove "mw-to-git" Patrick Steinhardt
2025-05-12 9:19 ` [PATCH v3 07/11] contrib: remove "persistent-https" remote helper Patrick Steinhardt
2025-05-12 9:19 ` [PATCH v3 08/11] contrib: remove "git-resurrect.sh" Patrick Steinhardt
2025-05-12 9:19 ` [PATCH v3 09/11] contrib: remove "emacs" directory Patrick Steinhardt
2025-05-12 9:20 ` [PATCH v3 10/11] contrib: remove "git-new-workdir" Patrick Steinhardt
2025-09-08 9:28 ` Gabriel Scherer
2025-09-08 9:58 ` Kristoffer Haugsbakk
2025-09-08 15:22 ` Gabriel Scherer
2025-09-12 18:14 ` D. Ben Knoble
2025-09-12 18:55 ` Gabriel Scherer
2025-09-12 22:21 ` Junio C Hamano
2025-09-12 20:05 ` Phillip Wood
2025-09-12 22:19 ` Junio C Hamano
2025-09-08 18:43 ` Junio C Hamano
2025-05-12 9:20 ` [PATCH v3 11/11] contrib: remove some scripts in "stats" directory Patrick Steinhardt
2025-05-13 2:53 ` [PATCH v3 00/11] Spring cleanup of "contrib/" Elijah Newren
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=a3aaa11a-a842-4c10-8189-07b681663573@gmail.com \
--to=phillip.wood123@gmail.com \
--cc=collin.funk1@gmail.com \
--cc=git@matthieu-moy.fr \
--cc=git@vger.kernel.org \
--cc=kristofferhaugsbakk@fastmail.com \
--cc=phillip.wood@dunelm.org.uk \
--cc=ps@pks.im \
--cc=sunshine@sunshineco.com \
--cc=tmz@pobox.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.
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 NNTP newsgroup(s).