nmh-workers
[Top] [All Lists]

Re: Appropriateness of new program/feature

2002-11-16 10:43:14
Jon Steinhart wrote:

There's no good way to test whether
or not nmh is installed.  When I set up my program, I want to fail with
an error message if the user hasn't set up a mail directory, etc.

...

So, I'd like to add something to nmh to allow for installation testing.  I
think that the best way to do this would be to add a report-only option to install-mh.


It's always bugged me that MH/nmh starts to install a new user setup if it can't find something it's looking for -- like the MH (.mh_profile) file. IMHO, it should simply fail and print an error message that gives the pathname of the MH file that it's looking for (that's either the setting of the MH envariable, or $HOME/.mh_profile). It could also tell the user how to install MH/nmh. The error could say something like:

"<progname>: aborting: can't read <pathname-of-MH-file>. Check your MH environment variable (if any) or run install-mh to install nmh."

I haven't given a lot of thought to the implications, or to all the possible permutations (which problems cause install-mh to be invoked). Still, this method (telling the user to run install-mh if MH isn't installed) seems like a more sane way to handle the problem. Comments, anyone? Would this change break any front-end programs (mh-e, etc.) that somehow depend on the prompts that install-mh now prints by default?

Jerry
--
Jerry Peek, jpeek(_at_)jpeek(_dot_)com, http://www.jpeek.com/


<Prev in Thread] Current Thread [Next in Thread>