@Luckygirl
The public doesn't know (and maybe never will) about Mair's exact diagnosis. I agree that mental health services are woefully inadequate, but I'm not sure what could have been done unless Mair had a diagnosis indicating he was a serious risk. Sadly, services very often don't kick in until a sufferer commits a crime.
Following on from the 'lecture' given to me by a previous poster, my sister worked at Ashworth, one of the three secure psychiatric hospitals in the country. She was also a director of community services for many years. From the accounts of Mair given by his neighbours, he behaved 'normally'. If that's the case and he hadn't told anybody about his intentions to murder, there would have been no reason to section him. The UK doesn't lock people up just because they seem a bit 'odd'. I have no doubt his medical records will be scrutinised by lawyers in the months to come, but they might not ever become public.
There seems little doubt that Mair killed Jo Cox, so we will have to wait for the defence. It could be manslaughter or his lawyers could try diminished responsibility. The magistrate has ordered a psychiatric assessment, which will probably take months. One way or the other, he will probably spend the rest of his life in a secure environment. Mair himself might not agree to a plea of insanity, because he might want his actions to be seen as rational.
Meanwhile, anybody who spouts an extreme ideology should take on the responsibility that there will always be Mairs in the community, who might take the rhetoric to its ultimate conclusion.