From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph LANGE Subject: Re: Best practice for canceled/moved recurring events Date: Tue, 2 Aug 2016 21:10:00 +0200 Message-ID: <6c7b07d2-2c22-70ed-53ca-98dbc5819e3a@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUf4w-0001wt-Ms for emacs-orgmode@gnu.org; Tue, 02 Aug 2016 15:10:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUf4q-00013r-RG for emacs-orgmode@gnu.org; Tue, 02 Aug 2016 15:10:13 -0400 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:35949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUf4q-00013P-Jr for emacs-orgmode@gnu.org; Tue, 02 Aug 2016 15:10:08 -0400 Received: by mail-wm0-x234.google.com with SMTP id q128so421124846wma.1 for ; Tue, 02 Aug 2016 12:10:08 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: SabreWolfy , emacs-orgmode@gnu.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.