Re: corrupted resource(s)

2001-08-20 12:40:21
On August 20, 2001 at 07:18, Lloyd Lim wrote:

I have two suggestions:

(1) Since an empty pattern ('') isn't useful, how about changing it so 
VARREGEX gets set to the default setting?  This is how most of the 
other resources behave.

Sorry, my previous explanation was not clear enough.  To summarize, if
the VARREGEX resource does not contain at least one non-whitespace
character, the setting is ignored and the current value of VARREGEX is
kept (which could be the default setting or a previously defined
setting).  However, I do agree that setting it to the empty pattern to
re-instate the default can be an acceptable behavior and some-what
consistent with other resources.  But, not all resources reset to the
default value if set to the empty string.  For example, the following
basically has no effect,


(and for EXCS, and some other resources, there is no way to specify
 "reset to defaults" on an individual resource basis).

I'm a little wary to have the empty string reset VARREGEX to the
default since an admin may have a base setting in system wide resource
file that should represent the default value.  Hence, whose default
value do we consider: MHonArc coded default or admin's specified

In general, the concept of resetting to default values has been
overlooked during the development of MHonArc.  Providing a consistent
way to do so for any given resource would require some tedious code
changes that I am unsure it is worth the effort or a high priority at
this time.  The method below to reset everything to defaults may be
sufficient for now.

(2) How about adding an entry to the FAQ about how to reset an archive 
to all of the default settings?  The answer would be:

mha-dbedit -nosaveresources -outdir /path/to/your/archive
mha-dbedit -saveresources -outdir /path/to/your/archive
mhonarc -editidx -outdir /path/to/your/archive

I believe two steps are all that are needed:

    mha-dbedit -nosaveresources -outdir /path/to/your/archive
    mhonarc -saveresources -editidx -outdir /path/to/your/archive

You could also include -rcfile option(s) to the last step if
you want to modify some resources from the default in case you want
to reset some resources and not all of them.

You are correct that it would be a useful addition to the FAQ.


P.S. BTW, for those of you that *always* specify -rcfile options when
invoking MHonArc, you may want to turn off SAVERESOURCES since no
benefits are gained saving the resource values within .mhonarc.db since
you respecify the resource settings for each invocation of mhonarc.

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