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 #
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
You can type
:r whatever (or copy by mouse)
and do not have to edit (and remember to edit) included part to escape
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:
#text/plain; name="foo" [ - ] /tmp/foo
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. 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.
 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?
 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
echo "$prog: No MIME encoding -- lines above aren't mhbuild input" >&2
echo "$prog: invoking mhbuild" >&2
(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, pgf(_at_)foxharp(_dot_)boston(_dot_)ma(_dot_)us (arlington, ma,
where it's 64.2 degrees)
Nmh-workers mailing list