3

I'm trying to use my Orgmode calendar via MobileOrg on my Android devices, to push events to the Google calendar, and neither sexp-formatted events nor recurring events (set up with +) seem to appear in Google calendar (for + recurring events the first one appears, but none of the subsequent ones).

The solution would seem to be to create individual entries for every occurrence of the recurring event, which will be tedious and inefficient. I assume there must be a way of harnessing the power of elisp in such a way to create a function which, when given a start date and a stop date and a time-span for recurrence [e.g. every day, every week etc.] (and, ideally, note any skipped dates, e.g. for holidays) and have that function output individual org-mode events. Has anyone done this sort of thing?

  • When you complete the recurring task, does Google calendar and/or MobileOrg automatically reschedule it again on the next due date? – lawlist Jan 21 '15 at 7:27
  • These are events, not tasks. – emacsomancer Jan 21 '15 at 14:23
3

The solution would seem to be to create individual entries for every occurrence of the recurring event, which will be tedious and inefficient.

Why? It would be the way to gain maximum control and AFAIK this is required for repeated events that you want to transfer via e.g. org-caldav.el. The reason is that you need an UID (Unique) for each event to be able to consistently track them (though ox-ical.el does provide such an UID for repeated events set up with e.g. org-class they are ignored by at least org-caldav.el).

Fortunately, org-clone-subtree-with-time-shift has been part of Emacs for a good many years. It will set up n headings for you with a timeshift, like +1w.

Example

(with-temp-buffer
  (save-excursion (insert "* foo\n<2015-01-21 mié>"))
  (org-clone-subtree-with-time-shift 2 "+1w")
  (buffer-substring-no-properties (point-min) (point-max)))

Output

 * foo 
 <2015-01-21 mié>
 * foo
 <2015-01-28 mié>
 * foo
 <2015-02-04 mié>
  • org-clone-subtree-with-time-shift seems to be exactly what is wanted to avoid tedious and inefficient inputting of individual events. – emacsomancer Jan 21 '15 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.