[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] Superfluous  's
From: |
Oliver Kiddle |
Subject: |
Re: [Nmh-workers] Superfluous  's |
Date: |
Wed, 29 Oct 2014 16:11:19 +0100 |
Norm wrote:
> I don't particularly mind seeing the  's. But they are a bit of a
> nuisance when I select text and insert it into some file.
>
> I will just have to get used to removing them. I could teach
> norms-cool-editor to defaultly ignore them, or at least to not write them.
> Maybe I will.
If it bothers you that much, use a script to put an http-equiv HTTP
header in. First a custom mhshow alias:
alias xshow='MHSHOW=~/Mail/xshow.profile mhshow'
xshow.profile contains:
mhshow-show-text/html: charset=%{charset}; ~/bin/browser ${charset:+-I
$charset} %F
And a rudimentary browser script follows below. Putting the <meta> tag
in right at the beginning is a bit dirty but basically works. The sleep
is there to be sure firefox has loaded the file before it gets deleted.
I also checked to see if firefox would honour the setting of a
user.charset extended attribute on the file. It doesn't but you might
find a browser that does.
Oliver
if [ "$1" = "-I" ]; then
tmp=`mktemp --suffix=.html`
{
printf '<meta http-equiv="content-type" content="text/html; charset=%s">'
"$2"
cat "$3"
} > $tmp
trap INT "rm $tmp"
firefox "$tmp"
sleep 1
rm $tmp
else
firefox "$1"
sleep 1
fi
- Re: [Nmh-workers] Superfluous  's, (continued)
Re: [Nmh-workers] Superfluous  's, David Levine, 2014/10/28