emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Org campture recursively expands %-escapes


From: Nicolas Goaziou
Subject: Re: [O] Org campture recursively expands %-escapes
Date: Tue, 12 Jan 2016 00:05:49 +0100

Hello,

Michael Brand <address@hidden> writes:

> I would like to push the attached change to add some ERTs with the
> commit msg below and would like to ask you for a review first.

It looks good. Thank you. Minor suggestions follow.

>  (ert-deftest test-org-capture/fill-template ()
> -  "Test `org-capture-fill-template' specifications."
> +  "Test `org-capture-fill-template' specifications.
> +The tests here are very similar to those in
> +`test-org-feed/fill-template'."

Not sure the last sentence above is really interesting. Ditto for the
other occurrences.

> -   (string-match-p
> -    (format-time-string (substring (car org-time-stamp-formats) 1 -1))
> +   (equal
> +    (concat "[" (format-time-string
> +              (substring (car org-time-stamp-formats) 1 -1)) "]\n")
>      (org-capture-fill-template "%u")))
>    (should
> -   (string-match-p
> -    (format-time-string (substring (cdr org-time-stamp-formats) 1 -1))
> +   (equal
> +    (concat "[" (format-time-string
> +              (substring (cdr org-time-stamp-formats) 1 -1)) "]\n")

I discovered recently (!) `org-time-stamp-formats' which avoids doing
the substring dance. You may want to use it instead. Ditto for the other
occurrences.


Regards,

-- 
Nicolas Goaziou



reply via email to

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