"This was the first pub I drank in in Edinburgh," he says, looking around. "I was sharing a flat just round the corner with a mate from school who was doing architecture, and his first project was about this pub. So we'd come along every night and do our 'research'."
Back then, before its stained glass windows and ornate wooden interior put it on the tourist map, Bennets Bar was the haunt of writers. Norman MacCaig was a regular. "You'd see him at the bar and of course I was always after tips because at that time I was writing poetry," Rankin recalls. "So you'd buy him a wee whisky and he'd tell you how to try to get published."
Today, however, Bennets is the haunt of two men who are very definitely not poets: Mike Mackenzie and Allan Cruickshank, respectively a self-made millionaire in a rut and a harassed banker with school fees and alimony to pay. Or, to dispense with the character names and give the actors their real ones, Douglas Henshall and Kenneth Collard, two of the four leads in comedy thriller Doors Open, which has taken over the pub for a day's filming.
Adapted from Rankin's 2008 novel of the same name, it also stars Stephen Fry as eccentric art expert Professor Robert Gissing, and Being Human's Lenora Crichlow as Mike's ex, Laura Stanton.
Equal parts love story, buddy movie, heist caper and celebration of a city, it's being brought to the small screen this festive season by Sprout Pictures, Fry's own company, with a script by James Mavor, a long-time friend of Rankin's. Fry bought the novel at an airport, loved it, and thought he'd be perfect to play Gissing. And so here we are.
Right now, as dry ice hisses out of a machine and hot tungsten lights pick out Henshall and Collard sipping whisky at the bar, director Marc Evans is preparing to shoot the scene in which Allan tells Mike he's been sacked. Blackout blinds have turned day into night and there's now a pleasing smoky ambience for director of photography George Steel to shoot through. Executive producer Gina Carter, Fry's business partner in Sprout, looks on approvingly from a doorway.
The plot turns on the decision by the three friends to steal ("liberate", in Gissing's words) a few paintings during the annual Doors Open day, when institutions such as art depositories allow the public into buildings normally closed to them.
The paintings in question are owned by a bank which employs Gissing as its curator-in-residence. The plan is to swap the real paintings for forgeries and trust that no-one will know the difference – no-one, perhaps, except Laura and her new boyfriend, who have been hired by the bank to help sell the collection. Aiding the inept trio outwit the constabulary is Mike's childhood friend Charlie Calloway (Brian McCardie), now a career criminal who has his own reasons for helping out.
Fry will be along later to shoot the pivotal scene in which he first mentions the plan to his sceptical friends. Meanwhile, one of Crichlow's big early scenes, a flashback in which we see Mike buying the painting that will come to symbolise his and Laura's relationship, was shot earlier in the New Town. It required the actress to become an auctioneer for the day.
"I'm not going to lie, it was a lot of fun," she laughs. "I didn't have time to research it but I watched lots of videos of auctions and we had real auctioneers on set who sat down with me. They were in the audience playing the people who were bidding so they kept an eye on things and told me what was and wasn't reading as authentic, so I trusted them."
To Crichlow's mind, however, Doors Open is a love story, first and foremost. "Mike bids for the painting in a bid to win Laura's heart. They get together and are in love, but when we meet them five years later they've broken up," she says. "Throughout the film they are playing catch up to get back to that early magical spark they shared, because it's clear there is still something between them."
His scene finished, Douglas Henshall ambles over and takes a seat. Clad in his onscreen gear of black Crombie coat, crisp white shirt, silky blue trousers and polished black shoes, he looks more like a suave criminal than an anguished lover, but he agrees with Crichlow's take on the story.
He says: "In the book, Mike's described as being bored, but in the way our script has been adapted – or so it seems to me, anyway – he's driven more from love for Laura, by the fact that he's lost her and the fact that this painting represents the five happiest years of his life. I don't think there's a great deal of logic to it, which I quite like."
Like Fry, Henshall has much invested in Doors Open. His commitment to the project came at the expense of a role in new US historical drama Hell On Wheels. Made by AMC, home to the award-winning Mad Men, it is set in 1865 and tells the story of the building of America's first transcontinental railway. But by the time AMC decided they wanted him for a part, Henshall had signed up with Fry.
America's loss is Scotland's gain, however. As well as Doors Open, Henshall can soon be seen playing a policeman in Shetland, a two-part murder mystery filmed on the titular island in June. Based on the work of crime writer Ann Cleeves, it sees him team up again with writer-director David Kane, who cast him in his Altmanesque 1999 film, This Year's Love.
Henshall says: "I've known Davie for over 20 years. He's a fantastically imaginative leftfield writer. He's not formulaic, which is one of the reasons I like him so much. His sense of humour is so sharp and dry."
Shetland and Doors Open mark a rare foray north for Henshall, though. His first small screen outing came in a 1990 episode of Taggart, which also featured Ewen Bremner and Peter Mullan – "I was a guy who fell off a bike," he recalls. "I was working with 7:84 theatre company at the time and I had a couple of days off to film two scenes - It wasn't a memorable role." But in the last decade only a biopic about Sir Arthur Conan Doyle and a couple of episodes of Sea Of Souls have brought him work in Scotland. "I don't get asked to do very much here," he says simply.
One project which might bring him back – with, perhaps, some A-list Caledonian talent in tow – is his long-cherished screen adaptation of Christopher Brookmyre's novel One Fine Day In The Middle Of The Night. "It starts off like Gregory's Girl and ends like Die Hard," Henshall says with relish. He had the film rights for a time but "trying to get it together was a nightmare - But you never know, I might have another bash at it".
Right now there's another Doors Open scene to have a bash at, and Henshall is ushered away. Rankin has disappeared too, his curiosity about how his amateur art thieves will look in the flesh satisfied and his cameo appearance in the can.
"The weird thing is, Doors Open was always meant to be a film," Rankin muses before he leaves. "James Mavor and I were sitting in a café years ago and he said, 'Wouldn't it be great if we had Ocean's Eleven set in Edinburgh?'. I said, 'Yeah, but we don't have any casinos.' He said, 'But it could be an auction house or an art gallery they're ripping off-'"
And so the cogs began to turn, cogs that have brought Fry & Co to the capital – and daylight robbery to Edinburgh's streets.
Doors Open is on STV on Boxing Day at 9pm