From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?=C5=81ukasz_Stelmach?= Subject: Re: schedule repeated reminder on multiple days for multiple weeks Date: Fri, 19 Feb 2010 12:30:47 +0100 Message-ID: <87y6iptqc8.fsf@dasa3.iem.pw.edu.pl> References: <7a3257-i8u.ln1@news.eternal-september.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NiR51-0007vs-Ec for emacs-orgmode@gnu.org; Fri, 19 Feb 2010 06:31:31 -0500 Received: from [140.186.70.92] (port=39989 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NiR4z-0007vN-Nr for emacs-orgmode@gnu.org; Fri, 19 Feb 2010 06:31:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NiR4u-0008LO-BU for emacs-orgmode@gnu.org; Fri, 19 Feb 2010 06:31:25 -0500 Received: from lo.gmane.org ([80.91.229.12]:49016) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NiR4u-0008LH-46 for emacs-orgmode@gnu.org; Fri, 19 Feb 2010 06:31:24 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NiR4l-0001R4-3O for emacs-orgmode@gnu.org; Fri, 19 Feb 2010 12:31:15 +0100 Received: from dasa3.iem.pw.edu.pl ([194.29.147.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 19 Feb 2010 12:31:15 +0100 Received: from lukasz.stelmach by dasa3.iem.pw.edu.pl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 19 Feb 2010 12:31:15 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Richard Riley writes: > What would the best approach be to schedule something like a radio > program which is on monday to friday at a certain time for the next 20 > weeks? --8<---------------cut here---------------start------------->8--- * Incredible Radio Show 20:00-20:55 &%%(and (and (< 0 (calendar-day-of-week date)) (< (calendar-day-of-week date) 6)) (diary-block 2010 3 1 2010 7 18)) --8<---------------cut here---------------end--------------->8--- The time is in the heading, you can use am/pm style too. The "&%%(" introduces diray sexp (an elisp snippet evaluated during the porcess of building agenda view). This one is true, which makes the event appear, when all of following conditions ar met: + the day of week obtained with calendar day of week is greater than 0 (0: sunday, 6: saturday), and less than 6. + the date is between 2010-03-01 (March 1) and 2010-07-18 (July 18) Note that: + you have to calculate the end date by hand (maybe there is a function for this, but the sexp would be longer), + the order of numbers in diary block expression depends on the value of calendar-date-style variable. This one is iso style. Refere to: -- Miłego dnia, Łukasz Stelmach