From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Campese Subject: Non-interactive insertion of future-dates Date: Wed, 25 Jan 2012 17:42:24 +0100 Message-ID: <87sjj3d98v.fsf@rman-office.uni.lux> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:44655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rq5x4-0004dZ-VL for emacs-orgmode@gnu.org; Wed, 25 Jan 2012 11:44:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rq5wv-0001UK-Nc for emacs-orgmode@gnu.org; Wed, 25 Jan 2012 11:44:02 -0500 Received: from smtp01.worldserver.net ([217.13.200.39]:46926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rq5wv-0001Tl-Ar for emacs-orgmode@gnu.org; Wed, 25 Jan 2012 11:43:53 -0500 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 Dear community, I want to setup a capture-template that sets a SCHEDULE-property in the future (say one week from today) without any user interaction. Currently, I almost achieve this by inserting the line :SCHEDULED: <%(org-read-date nil nil nil nil nil "+1w")> into my template. When I now call the template, I end up in the date-time-prompt, with "+1w" prefilled, so that manually have to press enter. Maybe it is trivial to call an interactive lisp-function and emulate some keypress, in which case I would be thankful for the code that achieves this (my lisp-skills are limited). Also, one should be able to achieve what I want by using format-time-string and increment the current time, but again my lisp-skills prohibit me from implementing it myself. In any case, it might be a good idea to include non-interactive access to relative times in template expansion, so that for example one can state something like %t[+1w] or %{+1w}t in the template to get the date one week from today (one should spend some more time to specify the actual input-format of course...). What do you think? Thank you very much, Simon