Explorar el Código

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
fpi hace 5 años
padre
commit
928e67df7e
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      lisp/org-protocol.el

+ 2 - 2
lisp/org-protocol.el

@@ -623,13 +623,13 @@ CLIENT is ignored."
             (let ((proto
             (let ((proto
 		   (concat the-protocol
 		   (concat the-protocol
 			   (regexp-quote (plist-get (cdr prolist) :protocol))
 			   (regexp-quote (plist-get (cdr prolist) :protocol))
-			   "\\(:/+\\|\\?\\)")))
+			   "\\(:/+\\|/*\\?\\)")))
               (when (string-match proto fname)
               (when (string-match proto fname)
                 (let* ((func (plist-get (cdr prolist) :function))
                 (let* ((func (plist-get (cdr prolist) :function))
                        (greedy (plist-get (cdr prolist) :greedy))
                        (greedy (plist-get (cdr prolist) :greedy))
                        (split (split-string fname proto))
                        (split (split-string fname proto))
                        (result (if greedy restoffiles (cadr split)))
                        (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)
                   (when (plist-get (cdr prolist) :kill-client)
 		    (message "Greedy org-protocol handler.  Killing client.")
 		    (message "Greedy org-protocol handler.  Killing client.")
 		    (server-edit))
 		    (server-edit))