Bishul Akum
The gist of it is that the main component of coffee is water, which is edible raw and not subject to bishul akum, therefore the drink itself is not subject to bishul akum. This opinion is compounded by a number of other alleviating factors: viewing coffee beans as just flavoring to water, coffee not being a main component of a meal, coffee beans at time of roasting not being oleh al shulchan melachim, etc.
Shechar made of grain or figs or honey
(ו) סתם כלי עובד כוכבים הם בחזקת שאינם בני יומן לפיכך אם עבר ונשתמש בהם קודם הכשר התבשיל מותר: הגה אבל אם חמם מים בכלי של עובד כוכבים ללוש בהן פת אסור ללוש באותן מים דלדבר זה מקרי לכתחלה הואיל ועדיין לא התחיל הנאתו שלא הוחמו לשתיה (ש"ד והגהותיו)
Normal vessels belonging to an idol worshipper fall under the legal presumption that they are not benei yoman; therefore, if one transgressed and used them prior to making them suitable, the cooked substance is permitted.
Rema: But, if one warmed water in a vessel belonging to an idol worshiper with which to knead dough, it is forbidden to knead with that water, since this is called ab initio, since the individual has not yet begun to gain benefit from it, because he did not warm it to drink it. (en.wikisource.org)
שו"ת נודע ביהודה מהדורא קמא - יורה דעה סימן לו
על דבר קאפע של אינם יהודים בקאפע הייזר שלה. יפה הורה לאיסור שאין כאן שום ספק ובודאי הם בני יומן שבכל שעה שותין מהם חלב של אינו יהודי והיתר של כלי שני ג"כ עכ"פ לכתחלה אסור....ומה שהשיב לו המשיב שבפראג שותין בני תורה בבתים של אינו יהודי. ידע רום מעלתו אם הם בני תורה אינם בני יראה והמה קלי דעת
ולהלכה למעשה בדרך באושפיזא שאין שם כלים אחרים מיחשב דיעבד אבל בעיר במקום שיש כלי יהודים ודאי אסור ואם מערה מכלי ראשון אפילו דיעבד אסור. וכבר דברתי מזה פה והשיב הרב המאור הגדול מוהר"ר מאיר פישלש שאולי מקילין הואיל ולא שכיח חלב טמא וכדעת הפר"ח. ולא רציתי להכניס עצמי ולהתיר בזה ומי שכח בידו לאפרושי מאיסורא מצוה רבה עביד.
גם בקהלתנו הלומדים היראים נזהרים מלשתות בבית א"י. ואפילו בעלי בתים שיש להם ידיעת בית רב נזהרים מזה. ולמחות בהמון אין כח בידינו אחרי שרואין קצת אינשי דלא מעלי מקילין.
Responsa Noda B'Yehudah YD 36 (18th century, Prague)
Concerning the coffee of non-Jews in their coffeehouses. You instructed correctly that there is no doubt that this is prohibited. And the vessels were certainly used that day for they drink Gentile milk all day long. And the permission to use a secondary vessel is ab initio prohibited...
And the response given that in Prague Torah observant Jews drink in Gentile homes, you know that if they are Torah observant they are not Torah fearing and they are fools.
And as for the practical halakhah: When being hosted on the road and there are no other vessels (with which to drink the coffee) this is considered ex post facto.
But in the city where there are Jewish vessels that could be used, it is certainly forbidden. And if they pour directly from a primary vessel, even ex post facto it is prohibited.
And I already spoke about this matter here and Rabbi Fishlish responded that perhaps they are lenient because non-kosher milk is uncommon. I did not want to insert myself into this issue and rule leniently, and one who has sufficient power to stop other people from prohibited matters is performing a great mitzvah. Here too in our community those who study Torah and are fearful are careful not to drink in the homes of Gentiles. But I do not have the ability to protest against the many (who do) since they see some people who are lenient.
(א) שלא הוחמו לשתיה. עבה"ט ובשו"ת נ"ב סי' ל"ו קאפ"ע שאלין אשר בקאפע הייזר של עובדי כוכבים יש לאסור לשתות בהם שבודאי הם ב"י שבכל שעה שותים בהם חלב של איסור ואהיתר של כ"ש ג"כ אין לסמוך דרש"ל וט"ז מחמירין וש"ך מחמיר בכלי חרס לכתחילה ולכן בעיר שיש שם כלים של יהודים אסור לכתחילה ואם מערה מכ"ר אפי' בדיעבד אסור ובדרך באושפיזא שאין שם כלים אחרים מיחשב דיעבד ובעיר יש להחמיר אף היכא דלא שכיח חלב טמא ומי שכח בידו לאיפרושי מאיסורא מצוה קא עביד ע"ש וצ"ע דהא כל שתיה בשאלין ע"י עירוי מכלי ראשון הוא וא"כ אפי' בדרך באושפיזא יש להחמיר ולשפוך מהכלי ראשון להכלי אחר שאין רגילים להשתמש בכל יום דאמרינן בי' סתם כלים אינן ב"י ומשם רשאי לשפוך להשאלין אף אם עדיין היד סולדת ואם אין היס"ב הכל שרי אפי' בעיר וע"י עירוי דמסתמא הכלים נקיים ומודחים הם:
That weren't heated for drinking.
According to the Be'er Hetev and in the Responsa of the Noda B'Yehuda regarding coffeehouses that belong to idolaters it's forbidden to drink from them. Certainly, they are always drunk from, every hour, with prohibited and kosher milk [so stam keilim doesn't apply]. Also, we can rely on the Rashal and Taz [who say that kli sheni isn't acceptable initially] and the Shach who is strict regarding earthenware. And so, in a city with Jewish vessels, it is forbidden initially, and if they are washed with hot water, even after the fact it is forbidden. And, on the road in an inn, where there aren't any other vessels, it's considered after the fact. And, in a city, there is reason to be strict even if impure milk is not common. And one who forgets, in his hand, to distinguish from that which is forbidden, it is a mitzvah to do so according to his opinion. And the answer is, that surely every drinking through pouring from a first vessel is, and if so, even on the road in an inn, there is reason to be strict and pour from the first vessel to another that isn't regularly used every day so we can rely on "stam keilim einan bnei yoman." And, from there, it is allowed to pour to the borrowed ones even if it hot enough that a hand would draw back from it. And if there's a concern, everything is allowed even in the city and through pouring because the vessels are clean and pushed away.