HATMANAH IN SOMETHING THAT ADDS HEAT
(Mishnah): We may not do Hatmanah (wrap food to keep it warm on Shabbos) in refuse of olives, manure, salt, lime, or sand, even if they are dry.
Shabbos 34a (Mishnah): If it is Safek dark, one may do Hatmanah.
(Rava): After dark, Hatmanah is forbidden (even) in something that does not add heat. This is a decree Shema Yarti'ach (lest one heat the food before wrapping it).
Question (Abaye): If so, we should forbid even Bein ha'Shemashos!
Answer (Rava): We are not concerned for this, for normally pots are boiling Bein ha'Shemashos.
(Rava): Even before Shabbos, we forbid Hatmanah in something that adds heat. This is a decree lest one wrap in Remetz (hot ashes mixed with coals).
Question (Abaye): Before Shabbos this is permitted!
Answer (Rava): We decree lest he stoke the coals after dark.
38b (Mishnah): A case occurred in which people in Tiverya brought a pipe of cold water through a hot spring. Chachamim said that if this was on Shabbos, it is like water heated on Shabbos; one may not bathe in it or drink it.
39a (Rav Chisda): The episode in Tiverya teaches that Hatmanah in something that adds heat is Batel (there is no Heter), even from Erev Shabbos.
Rif (Shabbos 14b): Hatmanah is forbidden even from before Shabbos in something that adds heat. This is a decree Shema Yarti'ach. Abaye asked that if so, it should be forbidden even Bein ha'Shemashos! Rava answered that normally, pots are already boiling Bein ha'Shemashos, so there is no concern.
Rosh (Shabbos 2:23) and Ba'al ha'Ma'or: Rava forbids Hatmanah is forbidden in something that adds heat, even before Shabbos. This is a decree lest one wrap in hot ashes and coals, and stoke the coals after dark. This is Rashi's text; it is primary. The Rif's text is not primary.
Rambam (Hilchos Shabbos 4:1): There are things that if they are used for Hatmanah, they get hot and cook the food, such as refuse of olives, manure, salt, lime, or sand.
Rambam (2): Letter of the law, Hatmanah in something that adds heat should be permitted from before Shabbos, for we permit Shehiyah (leaving food on a fire on Shabbos). Chachamim forbade Hatmanah in something that adds heat lest the pot boil on Shabbos, and he will need to expose it until it cools off, and he will cover it again on Shabbos. If so, he does Hatmanah with something that adds heat on Shabbos, which is forbidden. Therefore, we permit it Bein ha'Shemashos, for then Stam pots already boiled and ceased bubbling, and do not boil again.
Rebuttal (Ra'avad): It is absurd to forbid from before Shabbos and to permit Bein ha'Shemashos! The Gemara says that normally pots are boiling Bein ha'Shemashos. The Rambam says that they ceased boiling! Indeed, the Rif's text was like the Rambam, but his Perush is very messed up. According to this text, the correct Perush is that in something that adds heat, he showed that he wants it hot for a long time, and sometimes its heat wanes, and he will boil it after dark. Abaye asked that if so, also Bein ha'Shemashos we should forbid in something that does not add heat. Since he delayed Hatmanah, this shows that that he wants it hot for a long time! Rava answered that for normally pots are boiling Bein ha'Shemashos, and they will keep their heat a long time. There is a better text.
Magid Mishneh: This is like the Ge'onim's text. The Rambam holds that it was known that Bein ha'Shemashos Hatmanah is permitted in anything. The Mishnah teaches this. The Rif says so in a Teshuvah (207). All the Acharonim disagreed, for it is unreasonable to forbid from before Shabbos and to permit Bein ha'Shemashos. Also the Ra'avad's Perush is difficult. Also, it is difficult to say that Remetz does not add heat!
Milchamos Hash-m: The Rif rejected Rashi's text, which is concerned 'Shema Yarti'ach' when wrapping in something that does not add heat. It cannot boil on its own! We do not suspect lest a Yisrael cook on Shabbos! Rather, the concern is only in something that adds heat. Perhaps it will boil, and he will uncover it and wrap it again.
Note: We must distinguish why Shehiyah was forbidden lest one come to stoke a fire on Shabbos.
Tosfos (39b DH mi'Ma'aseh): R. Shmuel says that 'Hatmanah is Batel' teaches that even b'Di'eved it is forbidden. R. Yonah says that this forbids even raw ox meat (which must cook for a long time, so stoking will not help).
Shulchan Aruch (OC 257:1): Hatmanah is forbidden in something that adds heat, even before Shabbos.
Beis Yosef (DH Ein): Rashi holds that the primary decree was for something not fully cooked. We decreed even about something fully cooked until the oven is swept (from coals) to ashes are put on the coals. The Rif's text was different. The Ran and Perush ha'Mishnayos explain that we are concerned lest the pot boil on Shabbos, and he will need to expose it until it cools off, and he will cover it again on Shabbos. If so, he does Hatmanah with something that adds heat on Shabbos, which is forbidden. We permit Bein ha'Shemashos, for then Stam pots already boiled and ceased bubbling, and do not boil again.
Mishnah Berurah (6): Even if he did Hatmanah (in something that adds heat) Friday morning, he may not leave it this way until dark.
Shulchan Aruch (ibid): If one did so, the food is forbidden even b'Di'eved. This is only if it was cold and became hot, or he is pleased that it cooked more. If it is as warm as at first, it is permitted.
Source: Ran and Ramban, in Beis Yosef DH v'Chosav).
Gra (5): 'Like water heated on Shabbos' (38b) connotes that we forbid only if it became hotter.
Magen Avraham (4): We do not forbid b'Di'eved if one did Shehiyah (b'Isur, b'Shogeg). We are more stringent about Hatmanah.
Magen Avraham (5): L'Chatchilah, it is forbidden even if he does not want it to cook more.
Kaf ha'Chayim (7): The food is forbidden to everyone until Motza'ei Shabbos. If the meat was already fitting to eat, it is permitted.
Rema: Some say that if one forgot and b'Shogeg did Hatmanah in something that adds heat, one may eat it.
Taz (2): It seems that there is no argument. This opinion permits only if the Hatmanah was primarily in something that does not add heat, and burning coals were found nearby.
Rebuttal (Kaf ha'Chayim 10): The Mordechai explicitly permits b'Di'eved if one did b'Shogeg Hatmanah in something that adds heat.
Rema: Some forbid only if he did so for the sake of the night, but Hatmanah in something that adds heat is permitted for the sake of the next day. B'Di'eved one may rely on this, as long as he does not do so regularly.
Magen Avraham (7): We permit only if it was already fully cooked. This is no more lenient than Shehiyah!
Magen Avraham (8): This opinion permits as long as it was cooked k'Ma'achal ben Drusai (a third or half). Then he will not stoke coals, for in any case it will be cooked in time for the morning meal.
Gra (7,8) Shibolei ha'Leket equates Hatmanah to Shehiyah. This is wrong. R. Yonah taught that Hatmanah is more stringent.
Mishnah Berurah (10): The Mechaber forbids even b'Di'eved. When necessary, one may rely on the lenient opinion, especially if the food was already fully cooked.
Mishnah Berurah (11): The lenient opinion also permits if the food was fully cooked and Hatmanah was done to eat it at night, for he will not stoke.
Mishnah Berurah (12): If he does not do so regularly it is forbidden, for really the lenient opinion was not accepted.