Time was running out for a high-profile writer to reach the book festival where he was due to speak. His London train was late, but the volunteer sent to collect him was waiting when he arrived. He was the biggest name in that day’s programme, and even as he was hurtling through the Borders countryside in the back seat of the car, the main tent was filling up, the audience abuzz.

They were cutting it fine, he thought, as another bend was taken at speed, but at this rate they would narrowly make it. Then, to his horror, the driver pulled up outside a convenience store. “I just need to get some cat litter,” he said, leaving the writer to stew. In the end they got there with seconds to spare, but as any author will tell you, years of life expectancy are lost under such conditions.

Book festivals are the high points of the literary year, a chance for authors to meet their readers and bask – briefly – in the limelight before returning to their lonely desks.

The Edinburgh International Book Festival, which is in full swing, is the biggest and, in my experience, best organised of them all, with a cast of thousands on stage and behind. But quite apart from Edinburgh, and other festivals already passed, there are many more still to come, from the bijou Beyond Borders festival at Traquair this weekend and Wigtown in September-October, to Bookmark in Blairgowrie in October, and the Cove & Kilgreggan and Tarbert book festivals late in November.

READ MORE ROSEMARY: Leaders across the globe aspire to the Roman model but ignore its history at their peril

As a rookie author you assume everything will go like clockwork, and are disconcerted when it does not. Quickly you learn that there will often be some sort of hitch or hiccup. Artistic types are renowned as prima donnas, but there is nothing more temperamental than a sound system. Some hiss like a gas leak, or emit eldritch screeches until the engineer can tame them. In certain venues, organisers assume no amplification is required. By the event’s end, the hard of hearing have developed tennis elbow from cupping their ears, and the softly spoken author is in need of a Fisherman’s Friend.

There are two schools of thought about whether it is better to be chaired for a session or undertake it on your own. The first is more enjoyable, unless the questioner goes off on the wrong tack. I’ve heard of one event where the chair gave the author a merciless grilling because he had written a book on a similar subject and disagreed with the guest’s position.

Once, I was introduced as the wrong writer, whose books had been ordered for me to sign. That’s the problem with googling. How likely are you to find two people with the same name? The Rosemary Goring in question had been raised on a farm in Patagonia during the Second World War, which explains why I’m sometimes asked if I miss Argentina.

There’s no better insight into the problems even the most feted authors encounter than James Kelman’s new novel. God’s Teeth and Other Phenomena is a comically excruciating account of a celebrated writer embarking on a six-week residency. It is a masterclass in how even the simplest situations can get out of hand, as organisers misunderstand the way writers work, think, and perform.

Kelman’s alter ego, Jack Proctor, is uneasy from the moment he takes up the post. What follows is a farcical, faintly dream-like sequence of mishaps and mistakes that build into a picture of the artist as a beleaguered old man who would like never again to engage with the public. “A 66-year-old writer travels for weeks to do an hour and a half performance and they cut it to twelve minutes in order to accommodate a first-time local writer of 37 summers and his fleet of relatives, including aged-aunts and babies-in-prams. It is so damn f***ing ach well one just gets sick of it, one really does”.

Unlike Jack Proctor, who vents his anger, some writers, when faced with an awkward situation, retreat into their shells. I once chaired a novelist who was miffed to see a hall only half-filled. She had previously agreed to read for 10 minutes before doing a Q&A, but once started she would not stop. On and on she read, filling the entire hour, as if this was an Audible recording and she was contractually obliged to reach the final chapter.

What goes wrong on stage is worst, because it plays out in public. But there are other predicaments that readers will never know about. Late one stormy night, I reached the hotel where I was booked to discover my room had been taken, and the occupant was already in bed. The proprietor stood outside the door, as if I might like to see where I would have slept, had things been better organised. Whispering for fear of wakening his guest, while rain dripped off me onto his floral carpet, he said he could find a spare bed somewhere, if I’d give him half an hour.

More disconcerting was the festival host who showed us his gun cabinet before we made for bed. We left him heading for the drinks cabinet, wondering what sort of journalists we were that we wouldn’t join him in a nightcap.

On another occasion, my husband was put up in a grand hotel in the depths of the country. It was winter, but outside was balmier than indoors. At the reception desk he heard one of the staff mention the boiler was on the blink. How long had it not been working?, he inquired, his breath pluming like smoke. Three days, they replied. Nearby, guests were huddled around a revolving fan heater, clutching gin and tonics. Had they needed more ice, they could simply have scraped it off the windows. That night he went to bed fully clothed, after eating all the shortbread on the hospitality tray in his room, because the restaurant had closed.

Nothing could be more disconcerting, though, than the writer who, at the Edinburgh International Book Festival, asked him to go out and warm up the audience before he came on. This was the mischievous Garrison Keillor. “How am I supposed to do that?” Alan asked in panic. “Tell a few jokes.” After an agonising few minutes Keillor stepped on stage and got things under control by asking the audience to join him in singing ‘Abide With Me’.

Rosemary Goring's latest book is Homecoming: The Scottish Years of Mary, Queen of Scots, published by Birlinn