diff options
author | Eric Wong <e@80x24.org> | 2021-09-11 08:33:19 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-09-11 21:12:40 +0000 |
commit | aa500f0243133f2e9e0c912eea3497e52ebc1903 (patch) | |
tree | f3f996a118afe5cc9014ac5a793f3285ffae4d25 /lib/PublicInbox/LeiToMail.pm | |
parent | 57fed2e4b78ed394db38ac6d9b9227722d546d98 (diff) | |
download | public-inbox-aa500f0243133f2e9e0c912eea3497e52ebc1903.tar.gz |
When composing replies in "git format-patch" cover letters, I'd been relying on "lei q -f text ...", but that still requires several steps to make it suitable for composing a reply: * s/^/> / to quote the body * drop existing In-Reply-To+References * s/^Message-ID:/In-Reply-To:/; * add an attribute line ... "lei q -f reply" takes care of most of that and users will only have to trim "From " lines, unnecessary results and over-quoted text (and trimming is likely less error-prone than doing all the steps above manually). This should also be a good replacement for "git format-patch --in-reply-to=...", since copying long Message-IDs can be error-prone (and this lets you include quoted text in replies).
Diffstat (limited to 'lib/PublicInbox/LeiToMail.pm')
-rw-r--r-- | lib/PublicInbox/LeiToMail.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/LeiToMail.pm b/lib/PublicInbox/LeiToMail.pm index dbf58df9..15729bda 100644 --- a/lib/PublicInbox/LeiToMail.pm +++ b/lib/PublicInbox/LeiToMail.pm @@ -410,9 +410,9 @@ sub new { $lei->{net} = $net; $self->{base_type} = 'imap'; $lei->{opt}->{save} //= \1 if $lei->{cmd} eq 'q'; - } elsif ($fmt eq 'text') { + } elsif ($fmt eq 'text' || $fmt eq 'reply') { require PublicInbox::LeiViewText; - $lei->{lvt} = PublicInbox::LeiViewText->new($lei); + $lei->{lvt} = PublicInbox::LeiViewText->new($lei, $fmt); $self->{base_type} = 'text'; @conflict = qw(mua save); } elsif ($fmt eq 'v2') { |