[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] nmh 1.6 -- proper comment char in .mh_profile?
From: |
Ken Hornstein |
Subject: |
Re: [Nmh-workers] nmh 1.6 -- proper comment char in .mh_profile? |
Date: |
Thu, 10 Jul 2014 13:17:48 -0400 |
>Forgive the comment from the peanut gallery, but if the code is
>already handling ^# specially, why not go all the way and make it
>a comment character? Is there a use for supporting #foo as a command?
Sigh. First off, it's not handling #^ specially, it's handling #:
specially. #foo, for example (really #foo:) receives no special handling.
Secondly ... you may or may not have noticed that the profile has a
format which looks suspiciously like an RFC-822 message, in that all of
the fields have the form:
foo: XXXX XXXX
and you may not be aware that you're not permitted blank lines in a profile
file either. Neither of these things are a coincidence.
The same parser that reads email messages (m_getfld()) also reads the
profile (also, it does sequence files). So to truely handle comments
would require changes to m_getfld(), which nobody is itching to do.
In theory we could simply ignore fields which begin with a '#' and not
put them in the profile structure; that might be worth doing. But that
would still not permit '#' as a generic comment character; you'd still
need to have a colon in there. It's one of those old MH things that
isn't wonderful, but none of the fixes are easy.
--Ken