mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-01-14 16:51:15 +00:00
org-protocol.el: New option `org-protocol-data-separator'.
* org-protocol.el: New option. (org-protocol-store-link, org-protocol-do-capture): Use it. TINYCHANGE
This commit is contained in:
parent
f2e40fe153
commit
d87ec54d4b
@ -273,6 +273,12 @@ string with two characters."
|
||||
:group 'org-protocol
|
||||
:type 'string)
|
||||
|
||||
(defcustom org-protocol-data-separator "/+"
|
||||
"The default data separator to use.
|
||||
This should be a single regexp string."
|
||||
:group 'org-protocol
|
||||
:type 'string)
|
||||
|
||||
;;; Helper functions:
|
||||
|
||||
(defun org-protocol-sanitize-uri (uri)
|
||||
@ -372,7 +378,7 @@ could contain slashes and the location definitely will.
|
||||
|
||||
The sub-protocol used to reach this function is set in
|
||||
`org-protocol-protocol-alist'."
|
||||
(let* ((splitparts (org-protocol-split-data fname t))
|
||||
(let* ((splitparts (org-protocol-split-data fname t org-protocol-data-separator))
|
||||
(uri (org-protocol-sanitize-uri (car splitparts)))
|
||||
(title (cadr splitparts))
|
||||
orglink)
|
||||
@ -433,7 +439,7 @@ Now template ?b will be used."
|
||||
(defun org-protocol-do-capture (info capture-func)
|
||||
"Support `org-capture' and `org-remember' alike.
|
||||
CAPTURE-FUNC is either the symbol `org-remember' or `org-capture'."
|
||||
(let* ((parts (org-protocol-split-data info t))
|
||||
(let* ((parts (org-protocol-split-data info t org-protocol-data-separator))
|
||||
(template (or (and (>= 2 (length (car parts))) (pop parts))
|
||||
org-protocol-default-template-key))
|
||||
(url (org-protocol-sanitize-uri (car parts)))
|
||||
|
Loading…
Reference in New Issue
Block a user