Plasmon excitation in core-level photoemission