From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Can I wrap a Babel call inside a macro? Date: Thu, 23 Jan 2014 23:42:51 +0100 Message-ID: <86ppniuxp0.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hello, I did the following test, not fully successfull: --8<---------------cut here---------------start------------->8--- #+name: current-time #+begin_src sh echo "$(date '+%Y%m%d.%H%M')" #+end_src #+results: current-time : 20140123.2339 Date/time: #+CALL: current-time() #+results: : 20140123.2339 #+MACRO: ct #+CALL: current-time() The current date and time is: {{{ct}}}. --8<---------------cut here---------------end--------------->8--- as the HTML export gives: --8<---------------cut here---------------start------------->8---

1 Tests

echo "$(date '+%Y%m%d.%H%M')"

Date/time:

20140123.2338

The current date and time is: #+CALL: current-time().

^^^^^^^^^^^^^^^^^^^^^^
--8<---------------cut here---------------end--------------->8--- As macros are expanded _before_ Babel calls are executed, I'd think this is possible, but I must miss something... Best regards, Seb -- Sebastien Vauban