* [PATCH 1/2] view: improve readability of msg_reply with here-doc
2016-06-30 9:58 6% [PATCH 0/2] view: reply instruction tweaks Eric Wong
@ 2016-06-30 9:58 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2016-06-30 9:58 UTC (permalink / raw)
To: meta
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
^ permalink raw reply related [relevance 7%]
* [PATCH 0/2] view: reply instruction tweaks
@ 2016-06-30 9:58 6% Eric Wong
2016-06-30 9:58 7% ` [PATCH 1/2] view: improve readability of msg_reply with here-doc Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2016-06-30 9:58 UTC (permalink / raw)
To: meta
It may be 2016, but top-posting still makes me cringe :<
Eric Wong (2):
view: improve readability of msg_reply with here-doc
view: reference posting style article on Wikipedia
lib/PublicInbox/View.pm | 42 ++++++++++++++++++++++++++++--------------
1 file changed, 28 insertions(+), 14 deletions(-)
^ permalink raw reply [relevance 6%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-06-30 9:58 6% [PATCH 0/2] view: reply instruction tweaks Eric Wong
2016-06-30 9:58 7% ` [PATCH 1/2] view: improve readability of msg_reply with here-doc Eric Wong
Code repositories for project(s) associated with this public 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).