emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christoph LANGE <math.semantic.web@gmail.com>
To: SabreWolfy <sabrewolfy@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Best practice for canceled/moved recurring events
Date: Tue, 2 Aug 2016 21:10:00 +0200	[thread overview]
Message-ID: <6c7b07d2-2c22-70ed-53ca-98dbc5819e3a@gmail.com> (raw)
In-Reply-To: <loom.20160722T152140-164@post.gmane.org>

SabreWolfy on 2016-07-22 15:29:
> I have a meeting at 09:00 every Monday:
>
> --8<---------------cut here---------------start------------->8---
> * Diary
> ** TODO Weekly Meeting
>    DEADLINE: <2016-07-18 Mon 09:00 +1w>
> --8<---------------cut here---------------end--------------->8---
>
> What is the best way of dealing with scenarios where (1) the meeting "next
> week" is on the Wednesday and (2) the meeting "two weeks" after that (or
> whatever) is canceled?

If you need this to be a TODO, then I can't answer your question.
However, for non-TODO entries like this …

* Meeting
  <2016-07-18 Mon 09:00>
  <2016-07-25 Mon 09:00>
  ...

I often use Lisp functions that work on dates.  Essentially, you convert
the entry to

* Meeting 09:00
  <%% SEXP >

or

* Meeting 09:00-10:00
  <%% SEXP >

When SEXP evaluates to true for a given day, the entry shows up on the
agenda for that day.  The basics of this are documented at
http://orgmode.org/manual/Timestamps.html.

Here are some examples from my diary.  Note that I'm using

(setq calendar-date-style 'iso)

<%%(org-class 2016 02 17 2016 04 30 3 8 12 14 16 18 20)>

Every Wednesday (3rd day of the week, starting with 0 = Sunday) in the
given date range, except ISO calendar weeks 12, 14, etc.

<%%(and (not (diary-block 2016 07 22 2016 08 31)) (org-class 2016 01 07
2016 12 31 4 1 3 5 7 9 11 13 15 17 18 20 21 22 24 26 27 28 30 32 34 36
38 40 42 44 46 48 50 52))>

Like above, but not if the date is between 2016-07-22 and 2016-08-31.

<%%(and (diary-float t 5 1) (diary-block 2016 03 01 2018 12 31) (not
(diary-date 2016 06 03)))>

First (1) Friday (day 5) of every month (t) in the given range
(diary-block), but not on 2016-06-03.

Hope this helps,

Christoph

-- 
Dr. Christoph Lange, Enterprise Information Systems Department
Applied Computer Science @ University of Bonn; Fraunhofer IAIS
http://langec.wordpress.com/about, Skype duke4701

→ Please note: I will be on parental leave from 29 July to 28 October.
  Colleagues will stand in for me by project.

      parent reply	other threads:[~2016-08-02 19:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-22 13:29 Best practice for canceled/moved recurring events SabreWolfy
2016-07-24 15:27 ` Jason Riedy
2016-08-02 19:10 ` Christoph LANGE [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c7b07d2-2c22-70ed-53ca-98dbc5819e3a@gmail.com \
    --to=math.semantic.web@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=sabrewolfy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).