The crime writer, whose new Rebus novel is “In a House of Lies,” is giving his archives to the National Library of Scotland: “There might be material there for some future Ph.D. researcher … long after I’m dead.”

What books are on your nightstand?

Too many! The latest offerings from Michael Connelly (“Dark Sacred Night”) and Lee Child (“Past Tense”), for starters. Then there’s Machiavelli’s “The Prince,” which a fan gave me on my recent U.K. book tour. The last book I read was “Hush Hush,” by the British mystery author Mel Sherratt.

Describe your ideal reading experience (when, where, what, how).

I do most of my reading either last thing at night in bed, or when I am traveling. Right now I am doing a lot of traveling. Trains, planes and ships. I’ll plug in headphones, play some ambient music and lose myself in a book.

What’s your favorite book of all time?

That’s such a tough question and the answer would change from day to day. Maybe Muriel Spark’s “The Prime of Miss Jean Brodie.” If I describe it as an absolute Tardis of a book, “Dr. Who” fans may understand. It is bigger on the inside than the outside.

Which books got you hooked on crime fiction?

Ruth Rendell was one of the first crime authors I read. The Scottish novelist William McIlvanney also wrote three hugely influential books featuring a detective called Laidlaw. Then there were the Americans: Lawrence Block, Sara Paretsky, James Ellroy.…

Who (besides Inspector Rebus) is your favorite fictional detective? And the best villain?

Michael Connelly’s Harry Bosch might just be my favorite detective. He reminds me so much of my own character John Rebus. But I also have a lot of time for TV’s Columbo. As for villains, the gangster in my Inspector Rebus series (Morris Gerald Cafferty) owes a lot to Mick Ballou in Lawrence Block’s Matt Scudder series.

What makes for a good mystery?

I think mystery fiction offers the complete package: a strong sense of place, complex main characters, moral and societal issues, roller coaster plotting. If you give me all of those, I’m happy as a reader.

What kinds of stories are you drawn to? And what do you steer clear of?

I’m fairly eclectic in my tastes. I’ll be rereading “Bleak House” one week and Carl Hiaasen or Elif Shafak the next. But I do have blind spots. For example, I love science fiction movies but don’t seem able to read sci-fi. I used to have to apologize to my friend Iain M. Banks about that.

What books might we be surprised to find on your shelves?

There’s a British novelist called Jilly Cooper. Her work is often called “women’s fiction.” She writes frothy romps with vast rosters of mainly comically exaggerated characters. I “discovered” her when I was trapped by snow in a French farmhouse and those were the only books in there that I hadn’t read. “Rivals” became a particular favorite. It’s all about the battle for a TV station franchise.

Who is your favorite overlooked or underappreciated writer?

I’m going to have to say Muriel Spark. She was an international best seller in her time but seemed to fade from view. In this her centenary year fans have been shouting her name from the rooftops. There are new editions of her novels (I’ve contributed an introduction to her New York novel, “The Hothouse by the East River”), and two places in Edinburgh (the city of her birth) have been named in her honor. She remains an author of great power and complexity.

What kind of reader were you as a child?

I grew up in a home with few books. My parents left school at 14 or 15 and I only ever remember them reading books on summer vacation. But comics provided affordable literacy and I got hooked on them — Batman, Superman, Fantastic Four, etc. Our village library was both refuge and place of wonder to me, and soon I realized that there were movies I wasn’t allowed to see (the likes of “The Godfather” and “One Flew Over the Cuckoo’s Nest” being restricted to those 15 and over) but that no librarian or bookseller was going to censor the written versions. Those were the books I began to devour, and soon enough I was trying to write my own comics and stories.

Favorite childhood literary character or hero?

I’d probably have to come back to comics again and say Batman. Such colorful adventures and mind-bending villains. The village of my childhood may have been gray, but my imaginative world was kaleidoscopic and technicolor.

What’s the last book you recommended to a member of your family?

Having devoured Kate Atkinson’s “Transcription,” I then pressed it on to my wife Miranda — not that she needed much encouraging! We met at university, both of us studying literature. Miranda also reads a lot of mystery fiction and is the first reader of any new manuscript of mine. She’s not slow to pass comment, so my novels have already been “edited” before they go near my publisher.

What’s the best book you ever received as a gift?

When I was a postgraduate student (writing a thesis on Muriel Spark), a friend presented me with a birthday gift of the first three volumes of Anthony Powell’s 12-novel sequence “A Dance to the Music of Time.” Powell was a terrible snob and his books mostly deal with the upper crust and their lives of privilege. But he was also an extremely elegant stylist and though I was reluctant I became a fan, devouring all 12 volumes. We follow the central character, Nicholas Jenkins, from school days through World War II to eventual old age as a respected novelist. The cast is large and memorable and I learned a lot from Powell about how to write about a central character who ages over the course of an extended sequence.

If you could require the president to read one book, what would it be?

Maybe the poems of Robert Burns. President Trump has Scottish blood on his mother’s side, so Burns seems apt. The “poet of the common man” is full of wisdom, empathy and humanity along with a respect of the natural world and its fragility.

And the prime minister?

The current British prime minister could do worse than read something European, perhaps a history of the continent, especially post-World War II.

What book did you feel you were supposed to like, and didn’t? Do you remember the last book you put down without finishing?

Lewis Grassic Gibbon’s 1932 novel “Sunset Song” has been voted the best Scottish book of all time. I’ve tried to read it a couple of times but, to my shame, it has defeated me. I can’t really explain why; I just couldn’t get on with it. I’ll happily give it another try at some point in the future. The last book I failed to finish was probably one of Iain M. Banks’s science fiction novels. We were friends and I loved his non-sci-fi work, so I persevered with his sci-fi but to no avail.

If you were to write something besides mysteries, what would you write?

If I did not write mysteries, maybe I would write comics/graphic novels. I still read them and love them. I have a fantasy that one day I will write a great Judge Dredd story.

Whom would you choose to write your life story?

I’m not especially keen on the notion of my life story being written. Writers tend to have adventurous inner lives but pretty mundane histories. Having said which, I am about to donate my archive to the National Library of Scotland. This comprises manuscripts (some unpublished), unrealized projects, correspondence with other authors, book contracts and so on. I suppose there might be material there for some future Ph.D. researcher or literary biographer — hopefully long after I’m dead.

You’re organizing a literary dinner party. Which three writers, dead or alive, do you invite?

I would be a mute host, listening intently to the conversation between Muriel Spark, Robert Louis Stevenson and Charles Dickens. Actually, I would have one question for R.L.S.: What was the original plot of “Dr. Jekyll and Mr. Hyde,” which his partner Fanny disliked so much he destroyed it?

What book do you think everybody should read before dying?

I wouldn’t prescribe any one particular book. As long as people are reading something, I’m content.

What do you plan to read next?

I am about to start a book tour in Canada, so am packing a few books, including Joseph Finder’s forthcoming thriller, “Judgment,” a perfect airplane read.