[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] repl and mime handling
From: |
rader |
Subject: |
Re: [Nmh-workers] repl and mime handling |
Date: |
Tue, 17 Jan 2012 12:03:54 -0600 |
>> also, when there's multipart/alternative choose text/plain over e.g.
>> text/html.
> The problem with that approach is that sometimes the text part just says
> ``There is no text part, use an HTML capable mail reader''. I'm seeing
> more of them these days.
Really? I've been reading text/plain over text/html with EXMH for years and
recently with my own mh front-end (mh-v) and this has never been an issue.
I think if you look closely you'll see stuff like...
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
...but those warning messages aren't actually in the text/plain part.
In my trash folder, 2000 msgs, I found three MUAs that include "MIME format
warning" messages but none of them printed the warnings in the text/plain part.
(There are also plenty of messages out there that are HTML only, but they
are encoded html only.)
> In mh-e we use the content that is being displayed to the user when we
> reply. If no content is displayed we do not include the original post.
> Otherwise we let the user figure out which content is most useful and
> include that in the reply. Would there be some way to figure this out by
> caching the details of the last show command which indicates which part was
> displayed (text or html)?
Yea, sure: use mhshow settings that generate text and quote them in the reply...
repl -filter /dev/null -nodraftfolder -nowwhatnowproc $*
mhshow -nopause -nomoreproc $* | sed 's/^/ > /' >> ~/Mail/draft
comp -use
Fancy version that uses draft-folder and prefers text/plain over text/html
follows.
steve
--
#!/usr/bin/perl -w
use strict;
my $argstr = join ' ', @ARGV;
my $mhpath = `egrep -i ^Path: $ENV{'HOME'}/.mh_profile 2> /dev/null`;
chop $mhpath;
$mhpath =~ s/^Path:\s*//i;
$mhpath = $ENV{'HOME'} . '/' . $mhpath;
my $drafts = `egrep -i ^draft-folder: $ENV{'HOME'}/.mh_profile 2> /dev/null`;
chop $drafts;
$drafts =~ s/^draft-folder:\s*//i;
my $repl = `repl -filter /dev/null -nowhatnowproc $argstr 2>&1`;
if ( $repl ne '' ) {
print $repl;
exit 1;
}
my $cur = `egrep ^cur $mhpath/$drafts/.mh_sequences 2> /dev/null`;
chop $cur;
$cur =~ s/^cur:\s*//i;
my $type = '';
my $plaintext = `mhlist $argstr | grep text/plain`;
if ( $plaintext ne '' ) {
$type = '-type text/plain';
}
open(OUT,">>$mhpath/$drafts/$cur");
open(IN,"mhshow $type -nopause -nomoreproc $argstr 2>&1 |");
print OUT "\n > ---- Original Message ----\n";
while(<IN>) { print OUT " > $_"; }
close(IN);
close(OUT);
print "made $mhpath/$drafts/$cur\n";
system("comp -use -draftmessage $cur");
- Re: [Nmh-workers] Dealing with missing From: header during send., (continued)
- Re: [Nmh-workers] Dealing with missing From: header during send., Ken Hornstein, 2012/01/10
- Re: [Nmh-workers] Dealing with missing From: header during send., Andreas Wittkemper, 2012/01/16
- Re: [Nmh-workers] Dealing with missing From: header during send., bergman, 2012/01/16
- Re: [Nmh-workers] repl and mime handling, Andreas Wittkemper, 2012/01/17
- Re: [Nmh-workers] repl and mime handling, Ken Hornstein, 2012/01/17
- Re: [Nmh-workers] repl and mime handling, Ralph Corderoy, 2012/01/17
- Re: [Nmh-workers] repl and mime handling, Ken Hornstein, 2012/01/17
- Re: [Nmh-workers] repl and mime handling, Paul Fox, 2012/01/17
- Re: [Nmh-workers] repl and mime handling, rader, 2012/01/17
- Re: [Nmh-workers] repl and mime handling, Jeffrey Honig, 2012/01/17
- Re: [Nmh-workers] repl and mime handling,
rader <=
- Re: [Nmh-workers] repl and mime handling, Ralph Corderoy, 2012/01/17
- [Nmh-workers] mh-v (was repl and mime handling), rader, 2012/01/17
- Re: [Nmh-workers] mh-v (was repl and mime handling), Michael Richardson, 2012/01/18
- Re: [Nmh-workers] mh-v (was repl and mime handling), rader, 2012/01/18
- Re: [Nmh-workers] mh-v (was repl and mime handling), Michael Richardson, 2012/01/19
- Re: [Nmh-workers] mh-v (was repl and mime handling), rader, 2012/01/23
- Re: [Nmh-workers] repl and mime handling, Tethys, 2012/01/18
- Re: [Nmh-workers] repl and mime handling, rader, 2012/01/19
- Re: [Nmh-workers] repl and mime handling, Ken Hornstein, 2012/01/17
- Re: [Nmh-workers] repl and mime handling, Bill Wohler, 2012/01/17