From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: New patches WAS Re: [PATCH] inline src block results can be removed Date: Wed, 21 Jan 2015 00:30:23 +0100 Message-ID: <87egqpxc6o.fsf@nicolasgoaziou.fr> References: <87egt81acy.fsf@gmail.com> <8761ejq9ek.fsf@nicolasgoaziou.fr> <87sihltt3v.fsf@selenimh.mobile.lan> <87zjbqrapy.fsf@nicolasgoaziou.fr> <87lhl2s5zc.fsf@nicolasgoaziou.fr> <87oapuac7g.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDiEe-0006GX-ST for emacs-orgmode@gnu.org; Tue, 20 Jan 2015 18:29:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YDiEb-0003Js-Mg for emacs-orgmode@gnu.org; Tue, 20 Jan 2015 18:29:24 -0500 Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]:53877) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDiEb-0003Jm-Gl for emacs-orgmode@gnu.org; Tue, 20 Jan 2015 18:29:21 -0500 In-Reply-To: (Charles C. Berry's message of "Mon, 19 Jan 2015 11:31:26 -0800") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Charles C. Berry" Cc: Aaron Ecay , Andreas Leha , emacs-orgmode@gnu.org, Ista Zahn , mcg "Charles C. Berry" 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,