From a476821ebecd9649b2c88a86a0562c757bb2c3a0 Mon Sep 17 00:00:00 2001 From: fpi Date: Fri, 3 Apr 2020 19:12:01 +0200 Subject: [PATCH] org-protocol: Allow slashes after sub-protocol This change lets org-protocol handle URIs with additional slashes before the start of the query string, e.g. org-protocol:/capture/?template=... instead of org-protocol:/capture?template=... --- lisp/org-protocol.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el index 55a534d0d..8fbff9611 100644 --- a/lisp/org-protocol.el +++ b/lisp/org-protocol.el @@ -617,13 +617,13 @@ CLIENT is ignored." (let ((proto (concat the-protocol (regexp-quote (plist-get (cdr prolist) :protocol)) - "\\(:/+\\|\\?\\)"))) + "\\(:/+\\|/*\\?\\)"))) (when (string-match proto fname) (let* ((func (plist-get (cdr prolist) :function)) (greedy (plist-get (cdr prolist) :greedy)) (split (split-string fname proto)) (result (if greedy restoffiles (cadr split))) - (new-style (string= (match-string 1 fname) "?"))) + (new-style (string-match (match-string 1 fname) "/*?"))) (when (plist-get (cdr prolist) :kill-client) (message "Greedy org-protocol handler. Killing client.") (server-edit)) -- 2.25.0