From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: nested macro expansion? Date: Wed, 19 Aug 2015 19:28:08 +0800 Message-ID: <87io8bo6uv.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZS1Xj-0008Gr-0y for emacs-orgmode@gnu.org; Wed, 19 Aug 2015 07:28:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZS1Xf-0002Jx-QL for emacs-orgmode@gnu.org; Wed, 19 Aug 2015 07:28:30 -0400 Received: from plane.gmane.org ([80.91.229.3]:47792) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZS1Xf-0002Iv-K8 for emacs-orgmode@gnu.org; Wed, 19 Aug 2015 07:28:27 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZS1Xa-0004xe-Gg for emacs-orgmode@gnu.org; Wed, 19 Aug 2015 13:28:22 +0200 Received: from 111.199.232.97 ([111.199.232.97]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 19 Aug 2015 13:28:22 +0200 Received: from eric by 111.199.232.97 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 19 Aug 2015 13:28:22 +0200 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 What I'm trying to do is have a macro that takes the computed TIMESTAMP property for an entry, and then runs it through a custom function that breaks out the start/end times, and produces a nicely formatted string from that. I don't see how to write a macro that feeds the value of a computed special property to a function. Right now my testing version looks like this: #+MACRO: bubba (eval (format-time-string "%Y" "$1")) and I'm calling it like this: {{{bubba({{{property(TIMESTAMP)}}})}}} That doesn't expand the interior "{{{property(TIMESTAMP)}}}" clause. What `format-time-string' ends up seeing is "{{{property(TIMESTAMP", without the final braces etc. Is there any way to get that value expanded first, and then passed to `format-time-string' (or, eventually, my custom function)? Thanks! Eric