unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 1/2] view: improve readability of msg_reply with here-doc
Date: Thu, 30 Jun 2016 09:58:33 +0000	[thread overview]
Message-ID: <20160630095834.2723-2-e@80x24.org> (raw)
In-Reply-To: <20160630095834.2723-1-e@80x24.org>

This should make formatting more apparent since we can rely
on <pre> semantics.
---
 lib/PublicInbox/View.pm | 36 ++++++++++++++++++++++--------------
 1 file changed, 22 insertions(+), 14 deletions(-)

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 27dd155..9d48dfc 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -54,21 +54,29 @@ sub msg_reply {
 
 	my ($arg, $link) = mailto_arg_link($hdr);
 	push @$arg, '/path/to/YOUR_REPLY';
+	$arg = join(" \\\n    ", '', @$arg);
+	<<EOF
+<pre
+id=R>You may reply publically to <a
+href=#t>this message</a> via
+plain-text email using any one of the following methods:
 
-	"<pre\nid=R>".
-	"You may reply publically to <a\nhref=#t>this message</a> via\n".
-	"plain-text email using any one of the following methods:\n\n" .
-	"* Save the following mbox file, import it into your mail client,\n" .
-	"  and reply-to-all from there: <a\nhref=raw>mbox</a>\n\n" .
-	"* Reply to all the recipients using the <b>--to</b>, <b>--cc</b>,\n" .
-	"  and <b>--in-reply-to</b> switches of git-send-email(1):\n\n" .
-	"  git send-email \\\n    " .
-	join(" \\\n    ", @$arg ). "\n\n" .
-	qq(  <a\nhref="$se_url">$se_url</a>\n\n) .
-	"* If your mail client supports setting the <b>In-Reply-To</b>" .
-	" header\n  via mailto: links, try the " .
-	qq(<a\nhref="$link">mailto: link</a>\n) .
-	'</pre>';
+* Save the following mbox file, import it into your mail client,
+  and reply-to-all from there: <a
+href=raw>mbox</a>
+
+* Reply to all the recipients using the <b>--to</b>, <b>--cc</b>,
+  and <b>--in-reply-to</b> switches of git-send-email(1):
+
+  git send-email$arg
+
+  <a
+href="$se_url">$se_url</a>
+
+* If your mail client supports setting the <b>In-Reply-To</b> header
+  via mailto: links, try the <a
+href="$link">mailto: link</a></pre>
+EOF
 }
 
 sub in_reply_to {
-- 
EW


  reply	other threads:[~2016-06-30  9:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-30  9:58 [PATCH 0/2] view: reply instruction tweaks Eric Wong
2016-06-30  9:58 ` Eric Wong [this message]
2016-06-30  9:58 ` [PATCH 2/2] view: reference posting style article on Wikipedia 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=20160630095834.2723-2-e@80x24.org \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).