Sorry for the headline, but it's getting to look very much like Artur Mas has agreed to withdraw as a candidate to be the next President of the Catalan government, with Carles Puigdemont, the CDC mayor of Girona, as the agreed compromise candidate. If this is confirmed, CUP's vote will mean that he will be elected by an absolute majority in tomorrow's emergency session of parliament.
I'm not sure of all the details yet (such as what Mas' role will be in that government) but I am pleased, and enormously relieved, that this last minute agreement has been reached. Independence for Catalunya is now firmly back on track.
I'll write more when things have become clearer. Meanwhile, there's a breaking news stream here.
Update - 18:13, 9 January 2016
The text of the agreement between Junts pel Sí and CUP is here.