It is a mark of politeness to greet those we chance to meet, or those who draw near, or whom we ourselves approach to engage them in conversation; likewise those engaged in some work, or dining, yawning, hiccoughing, sneezing, coughing.
To greet one who is belching or breaking wind is carrying politeness too far, but to greet one who is urinating or defecating is even worse breeding.

[Urbanitatis est, salutare obvios, aut eos, qui nos adeunt, aut quos adimus ipsi colloquendi gratia. Item operis aliquid agentes, coenantes, oscitantes, singultientes, sternutantes, tussientes.
In ructu crepituve ventris salutare, hominis est plus satis urbani. Sed incivilius etiam, eum salutare, qui reddit urinam, aut alvum exonerat.]

Desiderius Erasmus (1465–1536) Dutch humanist philosopher and scholar
Familiar Colloquies [Colloquia Familiaria], “On First Meeting [In Primo Congressu]” (1518–1533) [tr. Thompson (1997)]
    (Source)

(Source (Latin)). Other translations:

It is a piece of civility to salute those that come in your way; either such as come to us, or those that we go to speak with. And in like manner such as are about any sort of work, either at supper, or that yawn, or hiccup, or sneeze, or cough.
But it is the part of a man that is civil even to an extreme, to salute one that belches or breaks wind backward. But he is uncivilly civil that salutes one that is making water or easing nature.
[tr. Bailey (1725)]

It is a mark of good manners to greet those one encounters, those who approach us, or those whom we ourselves approach for the sake of conversation. The same applies when people are engaged in some task, dining, yawning, hiccupping, sneezing, or coughing.
To offer a greeting when someone belches or passes gas is the behavior of someone who is *too* refined. But it is even more uncouth to greet someone who is urinating or relieving their bowels.
[Google Translate (2026)]

It is a mark of courtesy to greet those we meet, whether they approach us or we approach them for the sake of conversation. Likewise, those doing some work, dining, yawning, hiccupping, sneezing, or coughing.
To greet someone during a belch or the rumbling of the belly is the part of a man more than sufficiently polished. But it is even more uncivil to greet him who is passing urine or relieving his bowels.
[Polytranslator (2026)]