"Charles C. Berry" <ccbe...@ucsd.edu> writes:

> This is probably the shortest path. I'd apprecaite it if you would
> refactor that part.

I implemented `org-macro-escape-arguments' which can replace your
initial snippet:

+                  ;; Escape commas and preceding backslash per
+                  ;;  (info "(org) Macro replacement").
+                  (replace-regexp-in-string
+                   "\\(\\\\*\\)\\(,\\)"
+                   (lambda (str)
+                     (let ((len (length (match-string 1 str))))
+                       (concat (make-string (* 2 (/ len 2)) ?\\) "\\,")))
+                   result nil t)


Regards,

Reply via email to