From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [patch] Formatting of {{{DATE}}} Date: Mon, 09 Feb 2015 01:55:06 +0100 Message-ID: <87vbjbucnp.fsf@gmx.us> References: <8761bc85pm.fsf@gmx.us> <87mw4oq8jn.fsf@nicolasgoaziou.fr> <87egq0q78r.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKcd8-0001FL-6C for emacs-orgmode@gnu.org; Sun, 08 Feb 2015 19:55:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKcd5-0006s1-0o for emacs-orgmode@gnu.org; Sun, 08 Feb 2015 19:55:14 -0500 Received: from mout.gmx.net ([212.227.17.22]:56174) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKcd4-0006ro-NQ for emacs-orgmode@gnu.org; Sun, 08 Feb 2015 19:55:10 -0500 Received: from W530 ([46.166.186.219]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0Lomql-1XfoZD3AAV-00gmDq for ; Mon, 09 Feb 2015 01:55:08 +0100 In-Reply-To: <87egq0q78r.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Mon, 09 Feb 2015 01:05:40 +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: emacs-orgmode@gnu.org Hi Nicolas, Thanks for the tips. Pushed as 8f38f03. I added a org-NEWS entry, but I don't know if it should be there. Feel free to let me know or remove it yourself if it shouldn't. BTW: when figuring out how the heck macros works I came across two other undocumented macros, namely {{{input-file}}} and {{{property(PROPERTY-NAME)}}}. I also added those to the manual. > (cons "date" > (let* ((date (plist-get info :date)) > (value (or (org-element-interpret-data date) ""))) > (if (and (null (cdr date)) > (eq (org-element-type (car date)) 'timestamp)) > (format "(eval (if (org-string-nw-p \"$1\") %s %S))" > (format "(org-timestamp-format '%S \"$1\")" > ;; Remove parent to avoid > ;; read error. > `(timestamp > ,(org-combine-plists > (nth 1 (car date)) > '(:parent nil)))) > value) > value))) Okay, that's cool. I wasn't aware of %S. > I think the later part could use an `org-element-copy' function (to be > implemented). Seems like it. Perhaps next weekend! =E2=80=94Rasmus --=20 Lasciate ogni speranza o voi che entrate: siete nella mani di'machellaio