Eruvin4: 4
מִי שֶׁיָּשַׁב בַּדֶּרֶךְ, וְעָמַד וְרָאָה וַהֲרֵי הוּא סָמוּךְ לָעִיר, הוֹאִיל וְלֹא הָיְתָה כַוָּנָתוֹ לְכָךְ, לֹא יִכָּנֵס — דִּבְרֵי רַבִּי מֵאִיר. רַבִּי יְהוּדָה אוֹמֵר: יִכָּנֵס. אָמַר רַבִּי יְהוּדָה: מַעֲשֶׂה הָיָה וְנִכְנַס רַבִּי טַרְפוֹן בְּלֹא מִתְכַּוֵּן.
One who sat down while on a journey, then stood up and saw that he was near a city, since it had not been his intention, he may not enter — [these are] the words of R’ Meir. R’ Yehudah says: He may enter. R’ Yehudah said: It once happened that R’ Tarfon entered without intent.