[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] contrib/lisp/ox-confluence.el: Export checkboxes; fix ti
From: |
Marc Ihm |
Subject: |
Re: [O] [PATCH] contrib/lisp/ox-confluence.el: Export checkboxes; fix timestamps in headlines |
Date: |
Wed, 03 May 2017 06:14:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (windows-nt) |
Hi,
Nicolas Goaziou <address@hidden> writes:
>
> This is a common mistake. Symbols in `cl-case' shouldn't be quoted. 'on
> is really (quote on), so you actually wrote
>
> (cl-case (org-element-property :checkbox item)
> ((quote on) "*{{(X)}}* ")
> ((quote off) "*{{( )}}* ")
> ((quote trans) "*{{(\\-)}}* "))
>
> which is not what you want:
>
> (cl-case 'quote ('a 1) ('quote 2) (t 3)) => 1
>
> This is why I prefer `pcase' over `cl-case'.
>
Interesting (and the docstring of `pcase') !
>> (format "h%s. %s%s\n%s" level todo-text text
>> (if (org-string-nw-p contents) contents ""))))
>>
>> @@ -181,7 +184,7 @@ a communication channel."
>> (defun org-confluence-timestamp (timestamp _contents _info)
>> "Transcode a TIMESTAMP object from Org to Confluence.
>> CONTENTS and INFO are ignored."
>> - (let ((translated (org-timestamp-translate timestamp)))
>> + (let ((translated (org-trim (org-timestamp-translate timestamp))))
>
> I'm not sure what this is supposed to fix. Does
> `org-timestamp-translate' return a string with leading or trailing
> blanks?
Yes, it did return trailing blanks for me.
> Anyway, I applied the patch in master branch, with the fix suggested
> above.
>
> Regards,
Thanx !