From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Org campture recursively expands %-escapes Date: Tue, 12 Jan 2016 00:05:49 +0100 Message-ID: <871t9nra2a.fsf@nicolasgoaziou.fr> References: <87d1uwpm1a.fsf@nicolasgoaziou.fr> <87610o2wkz.fsf@nicolasgoaziou.fr> <87io4kn6cn.fsf@nicolasgoaziou.fr> <87oad2qw4z.fsf@nicolasgoaziou.fr> <87bn92qsmb.fsf@nicolasgoaziou.fr> <87lh837fzx.fsf@nicolasgoaziou.fr> <87h9ipqrez.fsf@nicolasgoaziou.fr> <8737u7lmhg.fsf@nicolasgoaziou.fr> <87si26kab0.fsf@nicolasgoaziou.fr> <87k2nik594.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIlVC-0000Xl-E4 for emacs-orgmode@gnu.org; Mon, 11 Jan 2016 18:03:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIlVB-0004AP-HI for emacs-orgmode@gnu.org; Mon, 11 Jan 2016 18:03:54 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:37780) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIlVB-0004AG-BV for emacs-orgmode@gnu.org; Mon, 11 Jan 2016 18:03:53 -0500 In-Reply-To: (Michael Brand's message of "Sun, 10 Jan 2016 09:08:01 +0100") 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: Michael Brand Cc: Org Mode Hello, Michael Brand 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