From 40257be885a73bc055195c52d2acd354ce2ba0f9 Mon Sep 17 00:00:00 2001
From: Robert Ewald <roew@iris.no>
Date: Fri, 20 Nov 2020 15:52:00 +0100
Subject: [PATCH] org-protocol: Make org protocol defaults work on windows

* org-protocol (org-protocol-protocol-alist-default): Make default org-protocol
handlers work on windows

Windows inserts a slash in the protocol handler. By defining these
protocols with a trailing slash we are able to handle this case.

TINYCHANGE
---
 lisp/org-protocol.el | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el
index 4bc7cee31..5b6862b78 100644
--- a/lisp/org-protocol.el
+++ b/lisp/org-protocol.el
@@ -138,10 +138,15 @@ for `org-protocol-the-protocol' and sub-protocols defined in
 
 ;;; Variables:
 
+;; Windows inserts a slash in the protocol handler. Handle this case with the constants
+
 (defconst org-protocol-protocol-alist-default
-  '(("org-capture"     :protocol "capture"     :function org-protocol-capture  :kill-client t)
-    ("org-store-link"  :protocol "store-link"  :function org-protocol-store-link)
-    ("org-open-source" :protocol "open-source" :function org-protocol-open-source))
+  '(("org-capture"     :protocol "capture/"     :function org-protocol-capture  :kill-client t)
+    ("org-capture"     :protocol "capture"      :function org-protocol-capture  :kill-client t)
+    ("org-store-link"  :protocol "store-link/"  :function org-protocol-store-link)
+    ("org-store-link"  :protocol "store-link"   :function org-protocol-store-link)
+    ("org-open-source" :protocol "open-source/" :function org-protocol-open-source)
+    ("org-open-source" :protocol "open-source"  :function org-protocol-open-source))
   "Default protocols to use.
 See `org-protocol-protocol-alist' for a description of this variable.")
 
-- 
2.29.2

