Stavros Ntentos <[email protected]> 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 <[email protected]>

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.
--
unsubscribe: one-click, see List-Unsubscribe header
archive: https://public-inbox.org/meta/

Reply via email to