user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: Stavros Ntentos <stdedos@gmail.com>
Cc: meta@public-inbox.org, stdedos+git@gmail.com
Subject: Re: [PATCH v1] git-send-email-reply: Append subject
Date: Fri, 26 Mar 2021 19:36:33 +0000	[thread overview]
Message-ID: <20210326193633.GA14586@dcvr> (raw)
In-Reply-To: <20210326163146.30830-1-133706+stdedos@users.noreply.github.com>

Stavros Ntentos <stdedos@gmail.com> 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.

  reply	other threads:[~2021-03-26 19:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26 16:31 Stavros Ntentos
2021-03-26 19:36 ` Eric Wong [this message]
     [not found]   ` <CAHMHMxVS4tVvUYvWUmk8L8oqPPxtYW-MF_57Vwuzug-asWQiQg@mail.gmail.com>
2021-03-26 21:35     ` Eric Wong
2021-03-27  8:39       ` Stavros Ntentos
2021-03-27  9:54         ` Eric Wong
2021-03-27 14:01           ` Σταύρος Ντέντος
2021-03-27 19:32             ` Eric Wong
2021-03-28 16:00               ` Σταύρος Ντέντος
2021-03-28 22:58                 ` Eric Wong

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://public-inbox.org/README

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

  git send-email \
    --in-reply-to=20210326193633.GA14586@dcvr \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    --cc=stdedos+git@gmail.com \
    --cc=stdedos@gmail.com \
    --subject='Re: [PATCH v1] git-send-email-reply: Append subject' \
    /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

Code repositories for project(s) associated with this inbox:

	https://80x24.org/public-inbox.git

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).