[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] UTF-8 message bodies
From: |
Paul Fox |
Subject: |
Re: [Nmh-workers] UTF-8 message bodies |
Date: |
Thu, 31 May 2012 08:58:30 -0400 |
aleksander wrote:
> Ken Hornstein writes:
>
> > >It is possible to keep almost unchanged state with addition of
> > >one more clause to mhbuild like pair #off #on which marks the
> > >region where ^# is not interpreted as directive.
> >
> > But to me it seems dumb that # characters can't be in the
> > beginning of a line, and having people have to know about
> > #on/#off directives just seems like the wrong solution. [..]
> > But if you run "mime" at a WhatNow? prompt then presumably
> > you're smart enough to know you have to escape any leading #
> > characters.
>
> I'm trying to write as short as possible (to make less gramar
> mistakes =:-)), but sometimes it is too short.
>
> Suppose, you use automimeproc: 1 and you want to include (as a
> part of the message) some lines from program source, shell script
> or whatever.
>
> You can type
> #off
> :r whatever (or copy by mouse)
> #on
> and do not have to edit (and remember to edit) included part to escape
> leading #.
>
> As the additional directive, user doesn't have to know about it
> unless he needs it.
thanks for re-explaining -- i didn't get it the first time either. i
think this is a good idea. one could imagine a config option which
set the initial state, so that someone else could do:
#on
#text/plain; name="foo" [ - ] /tmp/foo
#off
if that's how they prefer to work.
to answer ken's question: i use automimeproc for the directives, and
am willing to reformat mail slightly to move leading '#' characters when
i get errors[1][2]. and i prefer not to have to type "mime" at the
whatnow prompt, because i'm sure it would result in my recipients
receiving a lot of mhbuild directives from me.
paul
[1] someone mentioned escaping: thanks -- it looks like doubling the
'#' character, just at the beginning of the line, will get you a
single # in the output. is that right?
[2] i also invoke mhbuild via a wrapper, that does this, in part:
...
# scan for '#!', '#<whitespace>', which probably mean this
# is a shell script, or other #-commented script, and not mime input.
# also check for common C-preprocessor tokens.
if egrep '^#[ !]|^#include|^#if|^#def|^#undef' $draft >&2
then
echo "$prog: No MIME encoding -- lines above aren't mhbuild input" >&2
exit 0
else
echo "$prog: invoking mhbuild" >&2
fi
...
(this of course means i can't use mhbuild directives in the same
mail where the plaintext contains shell comments or C code. hasn't
ever been an issue, that i recall.)
=---------------------
paul fox, address@hidden (arlington, ma, where it's 64.2 degrees)
- [Nmh-workers] UTF-8 message bodies, Joel Uckelman, 2012/05/28
- Re: [Nmh-workers] UTF-8 message bodies, Ralph Corderoy, 2012/05/28
- Re: [Nmh-workers] UTF-8 message bodies, Aleksander Matuszak, 2012/05/28
- Re: [Nmh-workers] UTF-8 message bodies, Ralph Corderoy, 2012/05/28
- Re: [Nmh-workers] UTF-8 message bodies, Aleksander Matuszak, 2012/05/28
- Re: [Nmh-workers] UTF-8 message bodies, Ken Hornstein, 2012/05/28
- Re: [Nmh-workers] UTF-8 message bodies, Aleksander Matuszak, 2012/05/30
- Re: [Nmh-workers] UTF-8 message bodies, Ken Hornstein, 2012/05/31
- Re: [Nmh-workers] UTF-8 message bodies, Aleksander Matuszak, 2012/05/31
- Re: [Nmh-workers] UTF-8 message bodies, Ken Hornstein, 2012/05/31
- Re: [Nmh-workers] UTF-8 message bodies,
Paul Fox <=
- Re: [Nmh-workers] UTF-8 message bodies, Ken Hornstein, 2012/05/31
- Re: [Nmh-workers] UTF-8 message bodies, Paul Fox, 2012/05/31
- Re: [Nmh-workers] UTF-8 message bodies, Ken Hornstein, 2012/05/31
- [Nmh-workers] [PATCH] mhbuild: implement #on/#off/#pop, and the -[no]directives switch, Paul Fox, 2012/05/31
- Re: [Nmh-workers] [PATCH] mhbuild: implement #on/#off/#pop, and the -[no]directives switch, Ken Hornstein, 2012/05/31
- Re: [Nmh-workers] [PATCH] mhbuild: implement #on/#off/#pop, and the -[no]directives switch, Ralph Corderoy, 2012/05/31
- Re: [Nmh-workers] [PATCH] mhbuild: implement #on/#off/#pop, and the -[no]directives switch, Paul Fox, 2012/05/31
- Re: [Nmh-workers] UTF-8 message bodies, valdis . kletnieks, 2012/05/31