diff options
author | Harri Kiiskinen <harri@pp-kaitue.(none)> | 2012-04-15 02:07:48 +0300 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-04-20 11:46:28 +0200 |
commit | d87ec54d4bc5897b3b029043285c9d81f857d751 (patch) | |
tree | 522577fc1e26fd7ac33c8e1131c7f709a45959c1 | |
parent | f2e40fe153a6d1fd07fb678cd0dd7fc52d716717 (diff) | |
download | org-mode-d87ec54d4bc5897b3b029043285c9d81f857d751.tar.gz |
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
-rw-r--r-- | lisp/org-protocol.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el index 775f609..05a6364 100644 --- a/lisp/org-protocol.el +++ b/lisp/org-protocol.el @@ -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))) |