A student used his Indian takeaway to fight off an armed robber who lunged at him with a knife, a court has heard.
Lynch had previously been jailed for robbery and assault
James Hogan, 23, used the bag to shield his face after John Lynch attacked him with an eight-inch knife in Paisley in October 2005.
The weapon struck Mr Hogan's bag and he managed to flee after the attack.
Jailing Lynch for seven years at the High Court in Edinburgh, Lord Hardie said he was guilty of an unprovoked attack on an innocent stranger.
The court heard that Lynch committed the crime two months after he was freed early from a seven-and-a-half year sentence for robbery and serious assault in 2000.
Lord Hardie told Lynch he must serve 600 days of his previous sentence before beginning his latest jail term.
The judge added: "This was an unprovoked attack upon an innocent stranger in the public streets of Scotland and that cannot be tolerated."
Lynch had earlier admitted assaulting Mr Hogan by attempting to strike him on the head with a knife and trying to rob him of a mobile phone and laptop computer in Canal Street, Paisley, in October 2005.
Lynch's co-accused Charmaine Taylor, 19, also admitted the offence. The pair, of Blackstoun Oval, Ferguslie Park, in Paisley, confronted their victim as he stood at a bus stop after college with the carry-out meal.
Advocate depute Alex Prentice said: "Lynch put his right hand up his left sleeve and pulled out an eight-inch-long knife with a serrated edge and lunged at his face."
Lord Hardie said that in order to provide additional protection for the public he would impose a further extended sentence on Lynch for eight years, when he would be kept under supervision and could be returned to prison.
The judge jailed Taylor for four years and two months for her part in the attack and attempted robbery on Mr Hogan.
He ordered her to serve an extended sentence for a further two years.