Function: org-protocol-parse-parameters

org-protocol-parse-parameters is a byte-compiled function defined in org-protocol.el.gz.

Signature

(org-protocol-parse-parameters INFO &optional NEW-STYLE DEFAULT-ORDER)

Documentation

Return a property list of parameters from INFO.

If NEW-STYLE is non-nil, treat INFO as a query string (ex: url=URL&title=TITLE). If old-style links are used (ex: org-protocol://store-link/url/title), assign them to attributes following DEFAULT-ORDER.

If no DEFAULT-ORDER is specified, return the list of values.

If INFO is already a property list, return it unchanged.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-protocol.el.gz
(defun org-protocol-parse-parameters (info &optional new-style default-order)
  "Return a property list of parameters from INFO.
If NEW-STYLE is non-nil, treat INFO as a query string (ex:
url=URL&title=TITLE).  If old-style links are used (ex:
org-protocol://store-link/url/title), assign them to attributes
following DEFAULT-ORDER.

If no DEFAULT-ORDER is specified, return the list of values.

If INFO is already a property list, return it unchanged."
  (if (listp info)
      info
    (if new-style
	(let ((data (org-protocol-convert-query-to-plist info))
	      result)
	  (while data
	    (setq result
		  (append result
			  (list (pop data) (org-link-decode (pop data))))))
	  result)
      (let ((data (org-protocol-split-data info t org-protocol-data-separator)))
	(if default-order
	    (org-protocol-assign-parameters data default-order)
	  data)))))