Teshuvot Min HaShamayim Siman 64
Can copy this into an AI, or connect the whole library to your assistant. For deeper learning, you can directly use the original seforim, sites, and apps.
ועוד שאלתי על יחיד הדר בעיר של גוים והיא מוקפת חומה ודלתותיה נעולות בלילה אם מותר לטלטל בכולה דהא קיי"ל דדירת גוי לא שמי' דירה ורבנן הוא דגזור וביחיד לא גזרו משום דלא שכיחא דדיירי ביה ביחיד, וכן אם נתאכסן יהודי בע"ש בעיר שכולה גוים ואין יהודי אחר בעיר אם מותר אחרי שהיא מוקפת חומה ודלתותי' נעולות בלילה או אם יש להחמיר בהן:
I also asked [in my dream] regarding an individual Jew living in a non-Jewish city surrounded by a wall, where the gates of the city are locked at night. Is this person allowed to carry on Shabbat within the city? For we have a tradition that the habitation of a non-Jew is not considered a habitation¹, and even though the rabbis decreed it nonetheless forbidden to carry on Shabbat among non-Jews, the decree was not made for individuals (Eruvin 63b:12). So too, regarding a Jew who lodges on Friday night in such a non-Jewish city, whether he is permitted to carry since it is surrounded by a wall and the gates are locked at night². Is it nonetheless preferable to be stringent on this issue?
footnotes: ¹ for the definition of public space on Shabbat, cf. Eruvin 62a:4 ² This is the opinion of the Mordechai (Siman 507) in the name of Rashi, quoted in Beit Yosef Orach Chaim 382. See however Terumat Hadeshen 76, who says that this statement of the Mordechai was not present in the manuscripts in Austria
והשיבו בדבר זה מנחמי' למדנו שהזהיר בני הגולה אל תוציאו משא מבתיכם ביום השבת והיו מקומות הרבה שדרו שם יחיד בעיר שכולה גוים:
They responded: we have learned this law from Nehemiah, who warned the entire people in exile: do not to take anything out of your home on the day of Shabbat³. Even at that time there were many places where Jews lived in entirely non-Jewish cities.
footnotes: ³ The language in Nehemiah 13:19 is slightly different, this quotation is from Jeremiah 17:22