all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Non-interactive insertion of future-dates
@ 2012-01-25 16:42 Simon Campese
  2012-01-25 17:37 ` Borbus
  2012-01-25 17:56 ` Jonathan Leech-Pepin
  0 siblings, 2 replies; 5+ messages in thread
From: Simon Campese @ 2012-01-25 16:42 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-01-28 22:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-25 16:42 Non-interactive insertion of future-dates Simon Campese
2012-01-25 17:37 ` Borbus
2012-01-28 17:42   ` Simon Campese
2012-01-25 17:56 ` Jonathan Leech-Pepin
2012-01-28 22:38   ` Simon Campese

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.