It's been always confusing for me to use articles. I don't want to go into details, but only with general use of articles. So, general rule, as far as I know is that we use "a/an" when we mention something for the first time. When we mention it again, we should use "the".
In this example dialogue:
A: Is there a lot of space in your flat?
B: Yes, on a wall in the living room.
Why there is "in the living room" and not "in a living room"? He mentions the living room for the first time, so why isn't used "a living room"?
Second general rule is that we use "the" when we talk about something specific. So:
Second example:
Well, there isn't another shop around here, but there is a nice shop with paintings near my place.
Why in this example there is use "a nice shop" instead of "the nice shop"? He mentioned "shop" twice, and he even said it more specific for the second time. According to the rule, when we say something more specific, we should use "the".
Another example:
A: Hey Fred, are there any nice paintings in this furniture shop?
B: Well, there are two. There is a modern painting over there and an old painting of a horse over there.
Person B says about specific paintings, why does he use "a modern painting" and "an old painting of a horse", he even points where are they using "over there". Shouldn't he use "the"?