Function: org-macro-extract-arguments

org-macro-extract-arguments is a byte-compiled function defined in org-macro.el.gz.

Signature

(org-macro-extract-arguments S)

Documentation

Extract macro arguments from string S.

S is a string containing comma separated values properly escaped. Return a list of arguments, as strings. This is the opposite of org-macro-escape-arguments.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-macro.el.gz
(defun org-macro-extract-arguments (s)
  "Extract macro arguments from string S.
S is a string containing comma separated values properly escaped.
Return a list of arguments, as strings.  This is the opposite of
`org-macro-escape-arguments'."
  ;; Do not use `org-split-string' since empty strings are
  ;; meaningful here.
  (split-string
   (replace-regexp-in-string
    "\\(\\\\*\\),"
    (lambda (str)
      (let ((len (length (match-string 1 str))))
	(concat (make-string (/ len 2) ?\\)
		(if (zerop (mod len 2)) "\000" ","))))
    s nil t)
   "\000"))