Dnia 2013-09-23, o godz. 12:46:35 Marcin Borkowski <mb...@wmi.amu.edu.pl> 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 code: (org-schedule nil (format-time-string "%Y-%m-%d" (current-time))) Adding a repeater seems to require something along the lines of (save-excursion (search-forward ">") (backward-char) (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, Cheers, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University