Q. A person is walking in the public territory on Shabbos. He stops. He puts his hand in his pocket and - whoops - there is a pocket siddur in his pocket. What should he do? Drop it on the ground? No makum patur nearby. And to make matters worse, it is also raining copiously and if left outside the shemos on the siddur will likely be damaged. Should he place it under his hat?
A. Shulchan Aruch (O.H. 301: 43) rules that if one finds a Sefer Torah in a field during Shabbos and it can become damaged by the falling rain, he should wrap himself with it and then cover it with an overcoat and thus bring it to town. Mishna Berura (ibid. 160) explains that the honor to the Sefer Torah is protecting it from damage by the rain. Piskei Teshuvos (301: n. 361) mentions that the above applies to all sifrei kodesh.
Horav Shlomo Miller's Shlit'a opinion is that he should carry the siddur less that four amos and stop each time until he finds a covered and protected makom petur. There is an added vantage to carry it under one's hat.
Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit'a