The code to use "comp -build" is significantly cleaner than what's currently in mh-bare-components, and I think it will work for any version of mu-mh that users might run into. So I'm inclined to use "comp -build" when it's available, and just use the current code as a backup (that may just be for nmh 1.5). Then hopefully someday we'll be able to remove the more complicated code.
So the next question is how MH-E determines that "comp -build" will work.
Option A would be to invoke "comp -help" and see whether "build" is listed. There are some complications, like the fact that nmh prints "-(build)" and mu-mh prints something different ("-(b)uild", IIRC). And it seems like we should just do it when MH-E determines the variant, not each time the user sends a message.
Option B would be to hardwire into MH-E knowledge about which versions of which variants support "comp -build". I generally dislike hardcoded tables like this, because they tend to get out of date. But once support for "comp -build" has been added to a variant, I doubt it will get removed, so we'd just be hardcoding the minimum version to use "comp -build". And this approach would be more robust in the face of changes to the help text.
So I'm inclined to go with Option B, but I'm open to arguments about why A (or some other option) would be better.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The code to use "comp -build" is significantly cleaner than what's currently in mh-bare-components, and I think it will work for any version of mu-mh that users might run into. So I'm inclined to use "comp -build" when it's available, and just use the current code as a backup (that may just be for nmh 1.5). Then hopefully someday we'll be able to remove the more complicated code.
So the next question is how MH-E determines that "comp -build" will work.
Option A would be to invoke "comp -help" and see whether "build" is listed. There are some complications, like the fact that nmh prints "-(build)" and mu-mh prints something different ("-(b)uild", IIRC). And it seems like we should just do it when MH-E determines the variant, not each time the user sends a message.
Option B would be to hardwire into MH-E knowledge about which versions of which variants support "comp -build". I generally dislike hardcoded tables like this, because they tend to get out of date. But once support for "comp -build" has been added to a variant, I doubt it will get removed, so we'd just be hardcoding the minimum version to use "comp -build". And this approach would be more robust in the face of changes to the help text.
So I'm inclined to go with Option B, but I'm open to arguments about why A (or some other option) would be better.
I'd follow any precedent that we already have in the code. I suspect that it may lead to Option B, but I'd scan the code first to see.
An alternative to using "comp -build" would be the patch described in https://sourceforge.net/p/mh-e/mailman/message/35302385/
Fixed by
This will appear in Emacs 26.2.