I was trying to get org-protocol to work on KDE Plasma 5.4.2. I set up my ~/.kde/share/kde4/services/org.protocol, but the standard org-protocol sample syntax: org-protocol://store-link://URL/TITLE resulted in the error: Malformed URL Port field was empty; source was "..."; scheme = "org-protocol", host = "store-link", path = "// ..." Modifying my Javascript to create links of the form: org-protocol://store-link:0//URL/TITLE made org-protocol correctly pass the link to emacsclient KDE 5.4.2. This patch allows the optional specification of a port in the URI. What do you think?