What is the difference between Flagge and Fahne?
I think that both can be used for a flag of a country.
Here are some examples where I think that they cannot be used interchangeably: Truppenfahne, Vereinsfahne, Zunftfahne, Regimentsfahne.
I have also found how to say a flagpole in German: Fahnenmast m, Flaggenmast m. So both Flagge and Fahne can be used here.
In English I can think of more meanings:
country flag (I think that this is Flagge) https://growingkidstherapy.files.wordpress.com/2014/06/o-american-flag-facebook.jpg
protest banner (no opinion) https://upload.wikimedia.org/wikipedia/en/a/a0/TU_banners.JPG
(Truppenfahne - army flag - so it is Fahne) http://www.sanitaetsdienst-bundeswehr.de/resource/resource/MzEzNTM4MmUzMzMyMmUzMTM1MzMyZTM2MzEzMDMwMzAzMDMwMzAzMDY3NjY2OTM3MzYzMDZiMzAyMDIwMjAyMDIw/image_popup.jpg
(Regimentsfahne - Fahne again) http://www.bshv-juechen.de/images/Regimentsfahne-bearb-2014.jpg
company flag (I think that this is Fahne) https://upload.wikimedia.org/wikipedia/de/5/57/FCN_Fahnen_8%E2%80%9313.jpg
Flagge = "als Hoheitszeichen oder Ehrenzeichen verwendete Fahne, die mit einer Leine an einem Flaggenmast gehisst wird und besonders zur Kennzeichnung der Nationalität eines Schiffes und als Verständigungsmittel im Seewesen dient" - DWDS
Fahne = "einfarbiges oder mehrfarbiges, oft mit Sinnbildern gekennzeichnetes, symbolhaftes Tuch, das an einer Stange befestigt ist" - DWDS
Am I right? What is the difference?
Thank you.