emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] New patches WAS Re: [PATCH] inline src block results can be remo


From: Nicolas Goaziou
Subject: Re: [O] New patches WAS Re: [PATCH] inline src block results can be removed
Date: Wed, 21 Jan 2015 00:30:23 +0100

"Charles C. Berry" <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]