Merge branch 'maint'
This commit is contained in:
commit
6c1aaff5ce
|
@ -596,11 +596,14 @@ CLIENT is ignored."
|
||||||
(let ((sub-protocols (append org-protocol-protocol-alist
|
(let ((sub-protocols (append org-protocol-protocol-alist
|
||||||
org-protocol-protocol-alist-default)))
|
org-protocol-protocol-alist-default)))
|
||||||
(catch 'fname
|
(catch 'fname
|
||||||
(let ((the-protocol (concat (regexp-quote org-protocol-the-protocol) ":/+")))
|
(let ((the-protocol (concat (regexp-quote org-protocol-the-protocol)
|
||||||
|
":/+")))
|
||||||
(when (string-match the-protocol fname)
|
(when (string-match the-protocol fname)
|
||||||
(dolist (prolist sub-protocols)
|
(dolist (prolist sub-protocols)
|
||||||
(let ((proto (concat the-protocol
|
(let ((proto
|
||||||
(regexp-quote (plist-get (cdr prolist) :protocol)) "\\(:/+\\|\\?\\)")))
|
(concat the-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))
|
||||||
|
@ -613,12 +616,14 @@ CLIENT is ignored."
|
||||||
(when (fboundp func)
|
(when (fboundp func)
|
||||||
(unless greedy
|
(unless greedy
|
||||||
(throw 'fname
|
(throw 'fname
|
||||||
(condition-case nil
|
(if new-style
|
||||||
(funcall func (org-protocol-parse-parameters result new-style))
|
(funcall func (org-protocol-parse-parameters
|
||||||
(error
|
result new-style))
|
||||||
(warn "Please update your org protocol handler to deal with new-style links.")
|
(warn "Please update your Org Protocol handler \
|
||||||
(funcall func result)))))
|
to deal with new-style links.")
|
||||||
;; Greedy protocol handlers are responsible for parsing their own filenames
|
(funcall func result))))
|
||||||
|
;; Greedy protocol handlers are responsible for
|
||||||
|
;; parsing their own filenames.
|
||||||
(funcall func result)
|
(funcall func result)
|
||||||
(throw 'fname t))))))))
|
(throw 'fname t))))))))
|
||||||
fname)))
|
fname)))
|
||||||
|
|
Loading…
Reference in New Issue