nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] nmh welcome message

2016-09-28 17:32:51
David Levine wrote:
I added a welcome message when nmh detects that its version
changed.  You'll you see it the first time after checking out

It's implemented by adding a Version: string to the user's context.

I like to have a different current folder in different terminals so in
my .zshrc, I do:
  export MHCONTEXT=/tmp/context.$$
I've also got aliases which point it to /dev/null to prevent folder
changes, e.g:
  alias new='MHCONTEXT=/dev/null flist +inbox +nmh-workers +....

So I'm sorry for being a pain but I'm concerned that the message
will get repeated with my non-standard usage.

Perhaps if the context file comes from $MHCONTEXT, it could only
print the message if the context file already has a Version: reference
where the version is old.

Also, it looks like you're just doing strcmp on the version. So
what happens for someone with an NFS shared home where the nmh
versions are out of sync between different client systems. They'll
get a welcome message every time they switch between their NFS
client systems, right? It might be better to limit it to cases where
the version number is actually newer.

If I remember correctly, there's already something printed if
.mh_profile is missing. Have you checked how it interacts with that. I
notice that install-mh is also in the exception list.

Another slight concern I have is with the exceptions being checked by using
strcmp on invo_name because links to nmh commands is maybe not that
uncommon to get different keys for ~/.mh_profile.

As a final point, should it be easier for packagers to customise the
message?

Oliver

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

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