emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [RFC] Org version of the Org manual


From: Achim Gratz
Subject: Re: [O] [RFC] Org version of the Org manual
Date: Fri, 22 Mar 2013 08:50:57 +0100
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130307 Thunderbird/17.0.4

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 :-)




reply via email to

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