[Top][All Lists]

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

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

From: norm
Subject: [Nmh-workers] Search order of the lines in .mh_profile
Date: Sat, 07 Jun 2014 07:39:23 -0700

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.
So maybe the program (i.e. pretty much every nmh command) should then abort.

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.
>Nmh-workers mailing list

    Norman Shapiro

reply via email to

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