What are the most important details of the setting?
The most important details for the setting of "After Twenty Years" are the street, the doorway, the darkness, and the weather. O. Henry creates a picture of a New York street at night when almost all the little business establishments are closed. That is why he sets the time as approximately ten o'clock. Shops that might have remained open until six or seven would be locked and dark by now. The corner drugstore is brilliantly lighted with the new invention of electric lights, but it is locked up for the night. The lights have only been left on as a form of advertising.
The vicinity was one that kept early hours. Now and then you might see the lights of a cigar store or of an all-night lunch counter; but the majority of the doors belonged to business places that had long since been closed.
O. Henry excelled at such descriptions. He specifies that the weather is cold, windy, and wet. This explains not only why the neighborhood is so nearly deserted, but why Bob is standing deep inside the doorway of the closed hardware store. Bob wants to stay as warm and dry as possible. He also has an unlit cigar in his mouth. He can't smoke a cigar in the rain. He might even have a hard time lighting it in the wind. But it seems to Bob, as well as to the reader, that the cop stops to talk to him because he looks a little sinister loitering in a darkened doorway. The cop is really Jimmy Wells, the man Bob is waiting for. And Jimmy only stops because he has that appointment made twenty years earlier.
The darkness and the cold, wet weather will also explain why the plainclothes officer whom Jimmy will ask to arrest his old friend is able to disguise his appearance by covering much of his face with his overcoat collars turned up and his hat turned down. He is not really protecting himself from the weather but from being seen too clearly by Bob, who would realize that he wasn't his old friend but a complete stranger. Jimmy couldn't have sent another uniformed cop like himself to make the arrest. Bob would have been alerted. He would have given the new cop a different name, of which he undoubtedly had many to choose from. A uniformed cop could not have won Bob's confidence the way the plainclothes detective did.
The setting also establishes a mood of loneliness and anomie which is common to all big cities at night. During the day a neighborhood may be bustling with all kinds of traffic and activity. But late at night many neighborhoods are forlorn and deserted. There is always danger after dark. This is when the burglars and robbers come out of hiding to prey on people. This is why the honest citizens need the protection of a man like Jimmy Wells. Bob too seems to belong to this setting. He is a criminal. He expects to be questioned by the uniformed beat cop who stops in front of his doorway. No doubt Bob has dealt with countless other such policemen over his years of underworld activities. Both these men, Bob and Jimmy, belong in the setting and to the setting.
The pervasive darkness enables Jimmy to talk to Bob without being recognized. It also enables the plainclothes police officer to approach Bob and lead him off arm in arm without being recognized as a perfect stranger. The drugstore blazing with the new electric lighting exposes the arresting officer's face, just as the lighting of the cigar had exposed Bob's; but it is too late for Bob to do anything but submit to his arrest. It seems as if, once he emerges from his darkened doorway, he is like a sea creature out of its shell.