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: Nicolas Goaziou
Subject: Re: [O] [RFC] Org version of the Org manual
Date: Fri, 22 Mar 2013 19:17:58 +0100

Achim Gratz <address@hidden> writes:

> Am 22.03.2013 15:22, schrieb Nicolas Goaziou:
>> Actually the code I pasted is wrong, I meant:
>>
>>    (split-string
>>     (replace-regexp-in-string
>>      "\\(\\\\+\\)?\\(,\\)"
>>      (lambda (str)
>>        (let ((len (length (match-string 1 str))))
>>          (if (evenp len) (concat (make-string (/ len 2) ?\\) "\000")
>>            (concat (make-string (/ (1- len) 2) ?\\) ","))))
>>      (org-matcĥ-string-no-properties 3) nil t)
>>     "\000")
>
> That is starting to make sense... :-)
> You might want to use the (function (lambda ...)) form.

Why? (function (lambda ...)) is equivalent to (lambda ...). In fact,
`lambda' uses `function' as a subroutine.

>> With the current implementation (and in your refactoring), it is
>> impossible to have '("a\,b").
>
> Yes, you'd need a second form of quoting to properly support that.
> It's also impossible to have leading or trailing whitespace, 

That's why I also suggest to drop the (mapcar 'org-trim ...) wrapper.
There's no reason to remove blanks if the user inserted them in the
first place.

> so I don't know how important it is to support this edge case of "\,".

Since that's not costly to achieve, there no real reason not to support
it.

So, any objection (or further comment) for that change?


Regards,

-- 
Nicolas Goaziou



reply via email to

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