[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Search order of the lines in .mh_profile

From: Paul Fox
Subject: Re: [Nmh-workers] Search order of the lines in .mh_profile
Date: Sat, 07 Jun 2014 11:01:49 -0400

address@hidden wrote:
 > Right now, all but the first line, of .mh_profile, assigning a given variable
 > is silently ignored. This seems wrong to me. All but the last assignment
 > should be ignored. Maybe an admonish message should be issued then.
 > But multiple assignment to the same variable, is almost always a user error.

(by "same variable", i assume you mean "profile entry"?)

 > So maybe the program (i.e. pretty much every nmh command) should then abort.

i disagree.  the system copy of mhn.defaults contains fallback
definitions, and the user is free to override those with entries in
.mh_profile or with $MHSHOW or $MHSTORE.  that's the whole point of
having one's own copy.  it would be very clumsy if one couldn't
do that without causing an error.

or perhaps i misunderstand.


 > Ken Hornstein <address@hidden> writes:
 > >> > Why the first instead of the last? Maybe because that's the way Bruce 
 > >> > Borden
 > >> > happened to program reading the lines of .mh_profile, one afternoon 
 > >> > during the
 > >> > American Civil War? Or is there a better reason?
 > >>
 > >>if the search order was "system-installed file first", then using the
 > >>last match would make sense.  but since the user's profile comes
 > >>first, it has to be able to override the system setting, otherwise it
 > >>would be useless.
 > >>
 > >>the fact that the $MHSHOW/$MHBUILD etc variables come in between makes
 > >>no sense -- one would usually view an environment variable as a
 > >>high-priority override, but not in this case.
 > >
 > >I think some of this might be simple oversight.
 > >
 > >The way readconfig() is implemented now, a new profile entry won't override
 > >an existing one.  So like Paul said, it makes sense to read the files
 > >you want to override everything else first.
 > >
 > >I went back and looked; MHSHOW was always read after .mh_profile was
 > >loaded (MHSHOW was added for nmh).  But thinking about this, this
 > >doesn't really make sense; you'd think a program-specific environment
 > >variable should override .mh_profile.  So maybe this is a case that
 > >Richard Coleman didn't really think this through, or it was a simple
 > >bug, or he had reasons for doing it that we don't know.
 > >
 > >I think it would make more sense to have MHSHOW profile entries override
 > >.mh_profile(), but that's a post-1.6 change I think.
 > >
 > >--Ken
 > >
 > >_______________________________________________
 > >Nmh-workers mailing list
 > >address@hidden
 > >https://lists.nongnu.org/mailman/listinfo/nmh-workers
 >     Norman Shapiro
 > _______________________________________________
 > Nmh-workers mailing list
 > address@hidden
 > https://lists.nongnu.org/mailman/listinfo/nmh-workers

 paul fox, address@hidden (arlington, ma, where it's 73.0 degrees)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]