Let's say I have a sentence like: "I will be at the beach from 4 to 7 this afternoon." and I want to add breakable spaces to prevent numbers from being isolated. So far, no problem, I could write something like: I will be at the beach from~4~to~7 this afternoon.
Now what if I'd like to say that I'd rather have a non-breakable space between 4 and to, but it's ok to remove it on emergency stretch if it doesn't fit then.
Is there a way to use "preferred" non-breakable spaces that will be honored only if there is no overfull lines?