Intensity data of X-ray photoelectron spectroscopy usually show strong spatial modulations due to diffraction of photoelectrons by the surrounding atoms of the emitter. Some of the theoretical aspects and recent developments in the surface analysis by this diffraction technique will be reviewed.