WHEN he closes the door of his grand corner office for the last time today - and, perhaps, takes a last peek down Hanover Street towards the Firth of Forth and Fife beyond - Sir John Peebles Arbuthnott will know his time as president of the Royal Society of Edinburgh (RSE) has been both historic and pivotal.

Historic, because of what has recently passed. It was during his three-year tenure, after all, that the 231-year-old society navigated the choppy waters of the independence referendum. Politically impartial but intellectually engaged with most aspects of Scottish affairs, the Society played a quiet but important role in a debate which reached its crescendo last month. "I said to myself 'We cannot allow this event simply to be held and then the consequences to be worked through without the Royal Society of Edinburgh somehow embracing it'," Sir John reflects.

The embrace he had in mind was a series of debates. The RSE assembled groups of experts from "both sides and no sides" to discuss the various issues in a series of open public meetings in its 150-seat auditorium. These were recorded to create a sort of oral history archive and published as a 250-page booklet called Enlightening The Constitutional Debate. Its first run of 3,000 copies sold out in a week. Sir John rummages on his desk for what must be one of the few remaining print copies. "Here," he says, handing it to me. "You can keep that".

His tenure is pivotal because the person elected to succeed him when he bows out today is astrophysicist Dame Jocelyn Bell Burnell. In a roll call of greats that includes Sir Walter Scott, engineer Lord Kelvin and Sir David Brewster, inventor of the kaleidoscope, she will be the first women to hold the post of Society president.

A decade and a half into the 21st century and four decades after the phrase "glass ceiling" was coined, why has it taken Edinburgh's pre-eminent Enlightenment institution so long to give its top job to a woman? Sir John rolls his eyes a little. "I don't know," he replies. "I can't answer that". But, he adds: "We have actively paid attention to eligible women candidates and the percentage [of female Fellows] is improving." Dame Jocelyn, he thinks, is "hugely qualified, very engaging, very committed and she'll be a terrific president". And he's quick to point out that among the members of the Young Academy of Scotland, distaff membership is approaching 50 per cent.

A significant initiative launched on his watch, the Young Academy came about through Sir John's recognition that one of the Society's major strengths - its high standards - was also a major weakness because prospective Fellows tended to be in their mid-50s or older before they had racked up the achievements in their fields to be deemed eligible.

"I was concerned this didn't give us much of a connection with dynamic young people," he says. "So over the period I've been here we have created the Young Academy." The Academy is required to run its own affairs and membership doesn't in any way guarantee entry to the Society proper. But it does give the RSE wider access to a pool of younger people excelling in a variety of disciplines. In other words it recognises potential and energy, and assumes that by nurturing those things, achievements will follow.

"The work they have done in some cases is innovative and different from what we do," he says. "And it's given a new, younger, dynamic feel to the Society."

So does he view himself as a moderniser? "I hadn't thought of that, honestly. But the answer is yes because generally the things I've done have all been to do with, not necessarily modernising, but updating and changing. I've seldom worked on something where I've gone in and said 'This is fine'."

If the RSE came in a tin, it would say on it something like: "Scotland's national academy of science and letters". Instead its home since 1909 has been a large townhouse on the corner of Hanover and George streets in Edinburgh's New Town which, on the day I visit, is advertising a discussion forum titled Invasive Species: Friends Or Foes?

Founded in 1783 and formed out of several others societies birthed in the intellectual hothouse that was Enlightenment Edinburgh, the RSE first sat in Edinburgh University's College Library under the presidency of Eton-educated Henry Scott, 3rd Duke of Buccleuch and 5th Duke of Queensberry and a lifelong friend of Adam Smith's. In 1820 Sir Walter Scott took the chair as the Society's third president and his 12 years in charge oversaw a move from the RSE's then-premises in George Street to what is now the Royal Scottish Academy. There would be one more move before the Society wound up back in George Street in its current home, just yards from the statue of the man Scott decked out in tartan regalia for his historic 1822 visit to Edinburgh - King George IV. There is a good view of him from the window of Sir John's office.

Today there are around 1,600 Fellows of the Society, elected for life and drawn from as wide range of disciplines. A microbiologist by training who would later become Principal and Vice-Chancellor of Strathclyde University, Sir John was plain John Arbuthnott when he was first made a Fellow in 1993. Mind you, had the Young Academy been in existence when he graduated from Glasgow University in 1960, I imagine he'd have been a prime candidate for that too - after all, he was offered his first lecturing job the day after he graduated, which makes him a high achiever in anyone's book.

As well as lecturing at Glasgow University, he continued to work in his chosen field and was a member of a team at Glasgow's Western General Hospital studying the infection we now know as MRSA. Then, in 1966, he landed a job working at New York University's School of Medicine. "It was an absolutely incredible time to be in New York," he says. "We lived in Greenwich Village which at that time was a hub for unbelievable poets and artists. It still is, but not quite the same. It was a wonderful experience. Our best friend still in New York was Bob Dylan's administrative assistant."

He's currently putting the finishing touches to a memoir in which New York and his experiences there will feature heavily - as will his recollections of the 12 years he spent working as Professor of Microbiology at Trinity College, Dublin. He and his wife Elinor moved there in 1976 and stayed until 1988, raising their three children in the city. The Troubles in Northern Ireland, he says, were "very palpable".

"At the time we moved over there, there were disturbing killings and bombings. It was an unstable time and you had to accept that. The currency changed three times, interest rates were enormous, it was almost impossible to buy a house. You'd ask yourself: 'Why the hell am I here?' But the people were terrific, the students were fantastic, Trinity College was an unbelievable place to work."

Now 75, Sir John is nearing the end of a long, distinguished and decorated career at the sharp end of medicine and education. Inevitably, he's also a veteran of high-level committees guiding institutions such as universities, health boards, the British Council and even the Scottish Government. In 2004, he chaired the Arbuthnott Commission which addressed the anomalies surrounding Scotland's differing constituency boundaries and various voting systems. Against that background, his two or three-day working week as RSE president would seem like something the microbiologist in him would appreciate - small beer.

Not a bit of it, he says. "This is undoubtedly one of the most significant things I've done and I was undoubtedly doing it at a very significant time for Scotland. And I'm proud of that."

And if his presidential career comes to a halt today, full-time retirement isn't yet on the cards. We will be seeing more of Sir John Peebles Arbuthnott. "I could tell you what I'm going to do next," he says with a smile "But that would take too long ..."