From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 1C37D1F9FC; Fri, 26 Mar 2021 19:36:33 +0000 (UTC) Date: Fri, 26 Mar 2021 19:36:33 +0000 From: Eric Wong To: Stavros Ntentos Cc: meta@public-inbox.org, stdedos+git@gmail.com Subject: Re: [PATCH v1] git-send-email-reply: Append subject Message-ID: <20210326193633.GA14586@dcvr> References: <20210326163146.30830-1-133706+stdedos@users.noreply.github.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210326163146.30830-1-133706+stdedos@users.noreply.github.com> List-Id: Stavros Ntentos wrote: > I keep copy-pasting the addresses provided, > I keep writing my plaintext reply in a file, > and I keep forgetting to add a subject > (because I am "just" writing a plaintext file) > > Teach `git-send-email-reply` to append a `--subject` line. OK, that seems reasonable. > Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com> Unlike the git.git project, we don't require Signed-off-by. Furthermore, publicizing "noreply" addresses doesn't seem worthwhile since they're not usable email addresses. > diff --git a/lib/PublicInbox/Reply.pm b/lib/PublicInbox/Reply.pm > index 8226fdc3..0f312fbe 100644 > --- a/lib/PublicInbox/Reply.pm > +++ b/lib/PublicInbox/Reply.pm > @@ -103,6 +103,8 @@ sub mailto_arg_link { > } > } > > + push @arg, "--subject=".squote_maybe($subj); > + > # I'm not sure if address obfuscation and mailto: links can > # be made compatible; and address obfuscation is misguided, > # anyways. That shows a URI-encoded subject unless address obfuscation is enabled. I think the following needs to be squashed in: diff --git a/lib/PublicInbox/Reply.pm b/lib/PublicInbox/Reply.pm index 0f312fbe..2a1066d2 100644 --- a/lib/PublicInbox/Reply.pm +++ b/lib/PublicInbox/Reply.pm @@ -74,6 +74,7 @@ sub mailto_arg_link { my $obfs = $ibx->{obfuscate}; my $subj = $hdr->header('Subject') || ''; $subj = "Re: $subj" unless $subj =~ /\bRe:/i; + my $subj_raw = $subj; my $mid = $hdr->header_raw('Message-ID'); push @arg, '--in-reply-to='.squote_maybe(mid_clean($mid)); my $irt = mid_href($mid); @@ -103,7 +104,7 @@ sub mailto_arg_link { } } - push @arg, "--subject=".squote_maybe($subj); + push @arg, "--subject=".squote_maybe($subj_raw); # I'm not sure if address obfuscation and mailto: links can # be made compatible; and address obfuscation is misguided, No need to resend if that looks alright to you, I can squash before pushing.