Sorry, I probably can't actually answer your question, I'm just trying to save you from the dustbin of page two. I tried to write up a GREP style suggestion for you, but maybe you've already considered this? I decided it'd probably take two GREP searches to apply No Break to either side of a compound word separated by a hyphen, and it felt like an awkward suggestion. Then, I tossed the question at Google, and found that Kenneth had posted about this issue in 2007. Interestingly, that thread covers this question (and a partial answer, why a GREP style won't work), and the odd behavior of the discretionary hyphen when used in a compound word with No Break applied.
Maybe there's some sort of obvious non-GREP answer. I often manage to gin up hacky solutions in these kinds of cases with a zero-width space, e.g. [word][nonbreaking hyphen][ZWS][word], in a paragraph style with hyphenation turned off. However, I doubt that's the answer, and if there is a good non-GREP answer, I simply can't consume enough coffee to make my brian generate the answer. Best of luck.
Whoops! Here's a valid link - I think that new Jive code must be fighting with some other JS stuff I run in Firefox - if I don't click Insert twice then the link gets lost.
So, Tom, would running a multi-pass search-and-replace work for you?
I don't think a multi-pass is necessary.
For compound words I search for: ([\w.]+-)([\w.]) This also finds any compound words that are also initials (U.S.-U.S.S.R).
Then I do a replace: $1~-$2. This allows the compound word to break at the hard hyphen but does not allow either word to break. What I don't understand is why the first word does not break. A discretionary hyphen before a word tells ID not to break that word. But the first word in the compound has no such d. hyphen.
For the words prior to and after an em dash I search for: (\w+)(~_)(\w+)
For replace I use: $1~-$2~-$3 This puts a d. hyphen before and after the em dash. It appears to me--I still don't get it--that this will stop either word from breaking but will allow a break either before or after an em dash.