[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Non-interactive org-schedule

From: Marcin Borkowski
Subject: Re: [O] Non-interactive org-schedule
Date: Mon, 23 Sep 2013 21:46:10 +0200

Dnia 2013-09-23, o godz. 12:46:35
Marcin Borkowski <address@hidden> napisaƂ(a):

> I'd like to call org-schedule from an Elisp function.  I'd like it to,
> say, insert today's date by default, and as a bonus, a repeater (I'm
> writing a custom org-insert-habit function, so that I can automate
> setting the STYLE and LOGGING proerties).  Calling just (org-schedule)
> did not work.  How to do that?

OK, so I did my homework.  (I had done it previously, too, but I ran
(apropos "today") which wasn't exactly what was needed;).)  Here's the

(org-schedule nil (format-time-string "%Y-%m-%d" (current-time)))

Adding a repeater seems to require something along the lines of

  (search-forward ">")
  (insert (concat
    " .+"
    (read-string "Minimum interval: ")
    (read-string "Maximum interval: "))))

(I realize that this is *very* crude implementation, but remember that
it's a quick-and-dirty hack to be used once every few days at most, so
coding it in an elegant way would be a bit of waste of time...)

> Best,


Marcin Borkowski
Adam Mickiewicz University

reply via email to

[Prev in Thread] Current Thread [Next in Thread]