GENIZAH OF KISVEI HA'KODESH [Genizah: Kisvei ha'Kodesh]
Gemara
(Mishnah): Kisvei ha'Kodesh (in an Ir ha'Nidachas) are buried.
We cannot burn a Mezuzah - "Lo Sa'ason Ken la'Shem Elokeichem."
Gitin 45b (Rav Nachman): A Sefer Torah written by a Min (a zealous idolater) must be burned. If a (regular) Nochri wrote it, it is buried;
(Beraisa #1): If a Sefer Torah was written by a Nochri, we burn it.
This is like R. Eliezer, who assumes that all actions of a Nochri are for the sake of idolatry;
(Beraisa #2): We bury it.
This is like Rav Hamnuna's Beraisa, which says that a Sefer Torah, Tefilin, or Mezuzah written by a Nochri or Yisrael Mumar is Pasul.
Erchin 6a (Beraisa): If a Nochri donated a beam for a Beis ha'Keneses with Hash-m's Name on it, for Yisraelim to use it, we cut off the place of Hash-m's Name, and bury it. The beam may be used.
We permit the rest, for a Name not in its place is not Kodesh;
(Beraisa): If Hash-m's Name was written on the handle of a vessel or on the legs of a bed, we cut off the Name and bury it.
Shabbos 116a (Beraisa): (On Shabbos) one may not save Sifrei Minim from a fire;
R. Yosi says, on a weekday one cuts out the Azkaros (names of Hash-m) and buries them. The rest we burn.
R. Tarfon: I would burn it with the Azkaros! Minim know Hash-m and deny Him. They are worse than idolaters, who do not know Hash-m.
R. Yishmael says, to make Shalom between a man and his wife (a Sotah) we erase Hash-m's name written in Kedushah. Minim arouse animosity between Yisrael and Hash-m, all the more we should destroy their Azkaros!
Megilah 26b (Rava): A worn-out Sefer Torah is buried next to a Chacham, even a Chacham who learned only Halachos.
(Rav Acha bar Yakov): We put it in a Keli Cheres (earthenware), so it will last - "u'Nsatam bi'Chli Chares Lema'an Ya'amdu Yomim Rabim."
Rishonim
Rif and Rosh (Hilchos Sefer Torah (after Menachos) 4b and Siman 20): If a Min wrote a Sefer Torah, we burn it. If a Nochri wrote it, we bury it.
Rif and Rosh (Hilchos Tefilin 7a and Siman 3): A Beraisa says that if a Min wrote a Sefer Torah, Tefilin or Mezuzah, we burn it. Another Beraisa says that we bury it.
Rambam (Hilchos Tefilin 1:13): If a Min wrote a Sefer Torah, Tefilin or Mezuzah, we burn it. If a Nochri or Yisrael Mumar wrote, it is Pasul and we bury it.
Rambam (Hilchos Yesodei ha'Torah 6:8): One may not burn or overtly destroy any Kisvei ha'Kodesh or explanations of them, i.e. if a Yisrael wrote it in Kedushah. If a Min Yisrael wrote a Sefer Torah, we burn it with the Azkaros, for he does not believe in the Kedushah of His name; he wrote it like other words. Therefore, the name is not Kodesh. It is a Mitzvah to burn it, lest we leave a name to Minim and their deeds. If a Nochri wrote Hash-m's name, we bury it. If Kisvei ha'Kodesh wore out or were written by a Nochri, we bury them.
Ran (Megilah 8b DH Hani): Even though we bury a Sefer that wore out, we put it in a Keli Cheres so it will last as long as possible.
Poskim
Shulchan Aruch (OC 154:5): If a Sefer Torah wore out, we put it in a Keli Cheres and bury it in a Chacham's grave, even if he learned Halachos and did not serve Chachamim (learn how to resolve difficulties between Mishnayos).
Magen Avraham (9): The same applies to other Seforim that wore out. I say that the same applies to all Tashmishei Kedushah; "Lo Sa'asun Ken la'Shem Elokeichem" applies.
Mishnah Berurah (22): The same applies to other Seforim that are written on leather parchment, wound (on rollers), with ink.
Mishnah Berurah (24): The same applies to other Seforim that wore out. One must bury them. He may not burn them, even though he intends to prevent disgrace.
Shulchan Aruch (334:21): If Kisvei ha'Kodesh were written by an Apikores, i.e. a devout idolater, or a Mumar to idolatry, we do not save it. Even on a weekday, we burn it with the Azkaros (mentions of Hash-m's name).
Gra (28): This is like R. Tarfon. R. Yishmael holds like him.
Beis Yosef (DH ha'Minim): Rashi explains that they wrote it in Ashuri characters in Lashon ha'Kodesh.
Bach (DH ha'Minim): We burn it, because the Azkaros were written l'Shem his idolatry. Therefore, coins with Hash-m's four-letter name on it that Minim minted l'Shem idolatry may not be hung on a Sefer Torah. One may not keep them. He must melt them down.
Mishnah Berurah (52): Rav Yehudah Milar was unsure if one may melt them, for perhaps they are not idolatrous Minim.
Chavos Yai'r (16): If Hash-m's name is on handles of Kelim or bed legs, they must cut off and buried. If this is due to disgrace, we permit a ring with his name, for it is not disgraceful. If we forbid handles of Kelim lest Hash-m's name be rubbed out, one may not wear the ring, but he may stamp with it, for this wears it out only a tiny amount. The Taz says that if Hash-m's name was written with Kedushah in the wrong place, it must be buried. It is no worse than Hash-m's name on the handles of Kelim. This implies that His name was on the Kelim with the intent for Kedushah. This is unlike Erchin 6a, which says that not in its place is not Kadosh, like handles of Kelim. We must say like Tosfos, that (even without intent) is Mekadesh the place of the writing.
Chavos Ya'ir (16): Erchin 6a forbids benefit from the Keli as long as Hash-m's name is on even the handle. Therefore, one may not wear the ring or stamp with it. Mas'as Binyamin (99) says that there is Kedushah on Hash-m's name engraved just like when it is written. Even though the one who made the stamp did not intend for the Kedushas ha'Shem, it is Kodesh by itself. Even what a Nochri carved out gets Kedushah! I say tha Swedish rings with the four-letter name were made to export them; this is like explicit intent for Chol.
Machatzis ha'Shekel (24 DH b'Chodoshim): This is unlike the Bach. Or, perhaps Chavos Ya'ir discusses rings minted by the kingdom, and the Bach discusses rings that Minim made themselves for idolatry. Or, we can distinguish between Minim and Stam Nochrim.
Kaf ha'Chayim (98): If one is unsure whether they were minted for idolatry, one may keep them or melt them. However, if they were written in Kedushah, a printing press (or mint) is like writing.
Kaf ha'Chayim (99): If Nochrim write our Kisvei ha'Kodesh in their language, one should be stringent to bury it. (Shiltei ha'Giborim Shabbos 43a:1)
Shulchan Aruch (YD 281:1): If an Apikores wrote a Sefer Torah, we burn it. Of a Nochri wrote it, we bury it.
Beis Yosef (DH Sefer): Tosfos says that if a Nochri wrote it in order to sell to a Yisrael, it is Pasul. Rashi connotes that it is Machshir, but I say that we can explain that he agrees that it is Pasul.
Taz (1): We assume that a Min wrote for idolatry. It is a Safek what a Nochri intended. The Rambam says that one may read alone in his house from a Pasul Sefer. The Tur forbids this if there is even a Safek that a Nochri wrote it, for perhaps it was written l'Shem an idol.
Shach (3): We bury a Sefer Torah that a Nochri wrote it, even if he did so in order to sell to a Yisrael.
Shulchan Aruch (OC 39:4): We burn Tefilin that an Apikores wrote. Some say that we bury it.
Beis Yosef (DH u'Rabeinu): The Tur and R. Yerucham say that if a Min wrote Tefilin we bury them, but we burn a Sefer Torah that he wrote. Rav Nachman discussed only a Sefer Torah. For Tefilin, we follow Rav Hamnuna, who says that we bury them. A Min writes Sifrei Torah for himself, so surely it is for idolatry. Tefilin he wrote for a Yisrael; perhaps it was not for idolatry. The Rif and Rosh say that we burn a Sefer Torah, and bring both Beraisos regarding Sefer Torah, Tefilin and Mezuzah. Since there was no Pesak, we do not overtly burn Tefilin or Mezuzos. Regarding a Sefer Torah, they rely on the ruling they gave.
Chidushei Hagahos (2): The text of the Rif and Rosh brings the Beraisos about burning or burying a Sefer Torah, Tefilin and Mezuzah.
Taz (3) and Gra (7): The primary text of the Tur says that we burn it. R. Yerucham is a lone opinion.
Mishnah Berurah (14): The Shulchan Aruch favors the first opinion.