Le Bugue, pop. 2500, is just 15 miles west of Sarlat. It was a town I had heard of, and I remembered it because the name is so distinctive. An American woman I interacted with on a forum for francophiles back in the 1990s had bought a house near Le Bugue. I was glad to go and see the town in 2006.
The famous Grotte de Lascaux, with its prehistoric paintings, was discovered in 1940 just a short drive northeast of Le Bugue in the town of Montignac, which, like Le Bugue, is on the Vézère river, a tributary of the Dordogne. On the way to Montignac or back, you can visit the Musée National de Préhistoire.