Having been taught in the Mishna (Shabbat 6:6-7, Shabbat 65a) that a woman may use a stone, nut or coin as a button to fasten her cloak on Shabbat, Abaye raises the question (Shabbat 65b) whether this may be done deliberately to enable a mother to carry a nut from her home through the public domain to give to her child to eat?
According to Abaye, such an action may be justified purely on the basis of our Mishna. Alternatively, Abaye suggests that it could also be permitted on the basis of הערמה – which Artscroll translate as ‘subterfuge’ and Steinsaltz translates as ‘artifice’. As the Gemara explains, in a situation where there is a house fire that is not life-threatening, Rabbi Meir permits a person to employ הערמה and put on and wear as many of the clothes in the burning house as possible in order to save them, while Rabbi Yossi does not support הערמה (see Shabbat 120a). At the same time, Abaye acknowledges that this specific usage of הערמה may not be applicable to our case, and as such, this specific debate ends with ‘Teyku’.
In terms of practical halacha, both the Rif and Rosh distinguish between carrying into semi-public domains (which is a rabbinic prohibition), and carrying into full public domains (which is a Torah prohibition), and they therefore take the position that this may be done in the former but not the latter. Rabbi Yosef Karo agrees with this distinction and this is the law as codified in the Shulchan Aruch (OC 303:23).
Yet while the case described by Abaye may sound like a stretch, Rav Shlomo Zalman Auerbach points out that it has a parallel in the modern period where those not living in an area where there is an eruv use a ‘Shabbat belt’ to carry a key from one place to another (see Shemirat Shabbat KeHilchata Ch. 18 note 171). As he explains, if the key is part of the belt, and if the belt is worn during much of Shabbat as a belt, then this is permitted and it may be worn even in a public domain. However, if the only reason why the key is on the belt is to transfer it to another place, this is comparable to the case of the nut and, as such, this may only be done while carrying in a semi-public domain.
Interestingly, this distinction does not seem to be mentioned in many other contemporary codes of Jewish law – perhaps because a Shabbat belt itself is viewed as a form of ornament for Shabbat, or perhaps because it was felt that this distinction would not be adhered to by the masses.