From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: [RFC] Org version of the Org manual Date: Fri, 22 Mar 2013 08:50:57 +0100 Message-ID: References: <87r4jeqq0i.fsf@Rainer.invalid> <87620k79fo.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIwke-0003PL-PA for emacs-orgmode@gnu.org; Fri, 22 Mar 2013 03:51:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIwkc-0001wl-O5 for emacs-orgmode@gnu.org; Fri, 22 Mar 2013 03:51:00 -0400 Received: from plane.gmane.org ([80.91.229.3]:34242) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIwkc-0001wM-Gy for emacs-orgmode@gnu.org; Fri, 22 Mar 2013 03:50:58 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UIwky-0001sG-1c for emacs-orgmode@gnu.org; Fri, 22 Mar 2013 08:51:20 +0100 Received: from p578f1838.dip.t-dialin.net ([87.143.24.56]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Mar 2013 08:51:20 +0100 Received: from Stromeko by p578f1838.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Mar 2013 08:51:20 +0100 In-Reply-To: <87620k79fo.fsf@gmail.com> 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: emacs-orgmode@gnu.org Am 21.03.2013 22:02, schrieb Nicolas Goaziou: > I suggest the following code instead, which allows to escape the > escaping backslash so the comma is not escaped: > > (args (mapcar 'org-trim > (split-string > (replace-regexp-in-string > "\\(\\\\+\\)?\\(,\\)" > (lambda (str) > (let ((slashes (match-string 1 str))) > (if (or (not slashes) (evenp (length slashes))) "\\1\000" > (concat (make-string (1- (length slashes)) ?\\) ",")))) > (org-match-string-no-properties 3)) > "\000"))) > > What do you think about it? I think this is a lot harder to understand and I would guess it is also quite a bit slower. Also I'm not sure why you are trying to match multiple backslashes. The original implementation and the description of the syntax says that the only character that can be escaped is a comma, so the new implementation changes behaviour in that regard (maybe intentionally, I can't tell). Regards, -- Achim. (on the road :-)