ייִדישער מחשבֿה אויף יואל 3:5

וְהָיָ֗ה כֹּ֧ל אֲשֶׁר־יִקְרָ֛א בְּשֵׁ֥ם יְהוָ֖ה יִמָּלֵ֑ט כִּ֠י בְּהַר־צִיּ֨וֹן וּבִירוּשָׁלִַ֜ם תִּֽהְיֶ֣ה פְלֵיטָ֗ה כַּֽאֲשֶׁר֙ אָמַ֣ר יְהוָ֔ה וּבַ֨שְּׂרִידִ֔ים אֲשֶׁ֥ר יְהוָ֖ה קֹרֵֽא׃

און עס װעט זײַן, איטלעכער װאָס װעט רופֿן דעם נאָמען פֿון גאָט, װעט אַנטרונען װערן, װאָרום אױף באַרג צִיוֹן און אין ירושָלַיִם װעט זײַן אַן אַנטרינונג, אַזױ װי גאָט האָט געזאָגט; און די געבליבענע װעלן זײַן די װאָס גאָט טוט רופֿן.

Kol HaTor

[e]. escapees [refugees] in Zion. The fifth principle is that [Joel 3:5] “for in Mount Zion and in Jerusalem there will be those who escape, ... and among the remnant, those whom the Lord will call.” Since according to Midrash Tanchuma, Zion is in the line of Mashiach Ben Yosef, whatever befell Yosef, befell Zion. The Gaon said that this is hinted at also in the word “among the remnant” which in gematria equals “Mashiach ben Joseph” [566], by means of whom, according to the Gaon, the ingathering of the exiles will be accomplished. As the number of ingathered increases, so the Sitra Achra will increase its strength. Then another prosecutor will be added, against those who do not strengthen the ingathering of exiles after the beginning of the Redemption has started with the ingathering, for then in “Zion and in Jerusalem there will be those who escape, ... and among the remnant ... .” A word to the wise is sufficient. This worried the Gaon a great deal. What is the connection between abundance from above on the one hand, and the refugees in Zion and Jerusalem on the other hand? The ingathering of exiles clears the way for abundance from above to reach Israel. The abundance in all the upper special characteristics that will come by way of Zion and Jerusalem will be evident in life, salvation, blessings, peace, loving kindness, mercy, goodness, etc. Such an abundance is mentioned specifically in the following passages. Abundance of life, for example, is noted in: “there the Lord commanded the blessing of life forever” [Ps. 133:3], and in, “to look upon the goodness of the Lord in the land of the living” [Ps. 27:133]. Abundance of salvation is noted in: “for from Zion comes salvation for Israel” [Ps. 4:7]. Abundance of blessings is mentioned in: “may God bless you from Zion” [Ps. 128:5], etc., and in: “because there the Lord commanded the blessing” [Ps. 133:3], etc. Abundance of peace, as in: “peace of Jerusalem” [Ps. 122:6] and Jerusalem means the city of peace.
פֿרעגט אַ רבֿBookmarkShareCopy

Kol HaTor

(Joel 3:5) “among the remnant whom the Lord calls” -- The term ‘remnant’ refers to Mashiach ben Yosef. In gematria both and equal 566. In the verse quoted it states: “And it will be that whoever calls on the name of the Lord will escape, for in Mount Zion and in Jerusalem there will be refuge, and among the remnant whom the Lord calls.”
פֿרעגט אַ רבֿBookmarkShareCopy

Sefer HaIkkarim

We also find instances in which the word “all” does not mean “of all,” and yet it denotes a small part of the whole, as in “I will pour out My spirit upon all flesh,” in Joel. This refers to a small part of all Israel, not to all of them, and surely not to the Gentiles. The phrase, “upon all flesh,” means upon any one at all of all flesh, even though he is not prepared for prophetic inspiration. There are many other such passages besides.
פֿרעגט אַ רבֿBookmarkShareCopy