It is narrated from Sayyiduna Umayyah bin Makhshi (may Allah be pleased with him), who was one of the Companions of the Prophet (peace and blessings be upon him), that he said: "The Messenger of Allah (peace and blessings be upon him) was sitting and a man was eating. He did not mention the name of Allah until only one morsel of his food remained, then he said: 'Bismillahi awwalahu wa akhirahu' (In the name of Allah, at its beginning and its end). (On hearing this) the Messenger of Allah (peace and blessings be upon him) laughed, then he (peace and blessings be upon him) said: "Satan kept eating with you, but when you mentioned the name of Allah, he vomited up whatever was in his belly.""
Imam Abu Dawud (may Allah have mercy on him) narrated it through Mu'ammal bin al-Fadl al-Harrani, from Isa bin Yunus.
And Imam al-Nasa'i (may Allah have mercy on him) narrated it through Amr bin Ali, from Yahya bin Sa'id, with the like of it.
Related hadith on this topic