ARTICLE AD BOX
By Glenn Campbell
Political editor, BBC Scotland
Boris Johnson stayed away from Scotland during the Holyrood election campaign this spring.
He was the first UK prime minister not to take part in a devolved Scottish election.
The Scottish Conservative Party had no problem with that - in fact some of them were relieved, delighted even.
Why? Because Boris Johnson is far from popular in Scotland and he has an unfortunate record of saying the wrong thing.
This is the prime minister who last year, for example, described devolution as a "disaster" - to the despair of some of his Scottish colleagues.
He has put his foot in it again on his most recent visit.
He nearly got to the end of a two-day trip without making a serious gaffe.
He had a policy row with Keir Starmer (who was also in Scotland) over a new oil field west of Shetland and a spat with Nicola Sturgeon about not calling in for tea.
But overall the prime minister's supporters thought the trip was going reasonably well.
There were accident-free visits to Police Scotland headquarters, to the BBC in Glasgow, and to an offshore windfarm in the Moray Firth.
That was until the prime minister gave a short, off-camera briefing to journalists where he joked that Margaret Thatcher had given the UK a "big early start" in the shift away from coal by closing so many mines.
To repeat, it was intended as a joke. But pit closures are a hugely sensitive subject in former mining communities in Scotland and across the UK.
Some communities feel they have never recovered from the loss of mining jobs and they hold Margaret Thatcher responsible for their misfortunes.
Others, of course, question the provocative role played by Arthur Scargill and the leadership of the National Union of Mineworkers in the 1980s.
In March this year, the Scottish government began consulting on legislation to pardon those convicted of offences related to the 1984-5 miners' strike.
Mr Johnson's political opponents seized on what they consider "crass" comments and have demanded an apology.
That has not been forthcoming but the PM's spokesperson has since said he recognises the impact and pain caused by mine closures.
During his Scottish tour, Keir Starmer mentioned the fate of mining communities as an example of how not to manage the transition from oil and gas to renewable energy production.
With three months to go to the UN climate summit in Glasgow, that transition to a lower-carbon future was a key theme of Boris Johnson's visit.
He was in Scotland to champion renewable technology and plans for a green recovery at a time when the UK has a leadership role in tackling climate change as host of COP26.
It is that look to the future that Number 10 would have wanted this trip remembered for.
Instead, it is the prime minister's comments reminding some people of a painful past that will linger.