1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-27 07:37:25 +00:00

org-protocol: Allow slashes after sub-protocol

* lisp/org-protocol.el (org-protocol-check-filename-for-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=...", as neede for some browsers.

TINYCHANGE
This commit is contained in:
fpi 2020-04-03 19:12:01 +02:00 committed by Bastien
parent cd336c2af3
commit 928e67df7e

View File

@ -623,13 +623,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))