From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Lundin Subject: Re: Organizing a students live Date: Tue, 22 Dec 2009 10:30:49 -0500 Message-ID: <87eimnc9g6.fsf@fastmail.fm> References: <877hskh81j.fsf@uni-mainz.de> <4B2C9A00.4000101@jboecker.de> <87oclv2osr.fsf@uni-mainz.de> <6ac505ad0912201454r1a9a951wbe4607adfa824376@mail.gmail.com> <6ac505ad0912210754x72a4e37cx674d3bf0af5cb4d6@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NN6go-0003Je-SI for emacs-orgmode@gnu.org; Tue, 22 Dec 2009 10:30:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NN6gk-0003FI-TW for Emacs-orgmode@gnu.org; Tue, 22 Dec 2009 10:30:22 -0500 Received: from [199.232.76.173] (port=50701 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NN6gk-0003F9-MW for Emacs-orgmode@gnu.org; Tue, 22 Dec 2009 10:30:18 -0500 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:49719) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NN6gk-0004aM-G8 for Emacs-orgmode@gnu.org; Tue, 22 Dec 2009 10:30:18 -0500 In-Reply-To: <6ac505ad0912210754x72a4e37cx674d3bf0af5cb4d6@mail.gmail.com> (Daniel Martins's message of "Mon, 21 Dec 2009 13:54:29 -0200") 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: Daniel Martins Cc: Matt Lundin , Emacs-orgmode@gnu.org Daniel Martins writes: > In fact, it helps! Thanks > > However a sentence like this: > > +# a class that meets every Monday evening between February 16 and > April 20, 2009 > ** Class 7:00pm-9:00pm > <%%(and (=3D 1 (calendar-day-of-week date)) (diary-block 2 16 2009 4 20 2= 009))> > > is not an example of simplicity and visibility for a quite common > feature! This is perhaps one of the most frequently asked questions about an FAQ. :)=20 Alas, given my meager elisp skills, you'd have to ask Carsten if he cares to implement this. > Maybe as a suggestion we could encapsulate such a huge expression in a > simpler org-mode function ? As you suggested, one could simply add the function below to one's ~/.emacs for a shorter/easier way to enter weekly events that last for a limited span of time. (I would recommend removing the holidays check unless you've already configured holidays for your locale.) Best, Matt > PS In > > http://www.emacswiki.org/cgi-bin/wiki/DiaryMode#toc12 > > I found another suggestion which I do not know how to include in org-mode > > > ------------------------------------ > Schedule > > If you want to write a schedule for school or university, you need to > define a block (it=E2=80=99s derived from diary-block) between two dates = and a > weekday. The following function also recognizes holidays and won=E2=80=99t > send you to school on those days=E2=80=A6 :) > > (defun diary-schedule (m1 d1 y1 m2 d2 y2 dayname) > "Entry applies if date is between dates on DAYNAME. > Order of the parameters is M1, D1, Y1, M2, D2, Y2 if > `european-calendar-style' is nil, and D1, M1, Y1, D2, M2, Y2 if > `european-calendar-style' is t. Entry does not apply on a history." > (let ((date1 (calendar-absolute-from-gregorian > (if european-calendar-style > (list d1 m1 y1) > (list m1 d1 y1)))) > (date2 (calendar-absolute-from-gregorian > (if european-calendar-style > (list d2 m2 y2) > (list m2 d2 y2)))) > (d (calendar-absolute-from-gregorian date))) > (if (and > (<=3D date1 d) > (<=3D d date2) > (=3D (calendar-day-of-week date) dayname) > (not (check-calendar-holidays date)) > ) > entry))) > > Then: "&%%(diary-schedule 22 4 2003 1 8 2003 2) 18:00 History" > > > ------------------------------------ > > > > 2009/12/20 Matt Lundin : >> Daniel Martins writes: >> >>> All academics here present (including of course Carsten) suffer from >>> the same problem, I think >>> >>> >>> *** Math classes >>> <2009-12-10 Thu 11:00-14:00 +1w> >>> >>> >>> will repeat forever and ever... >>> >>> We need to create a schedule for a period. >>> >>> The package "remind" (and its simple interface "wyrd") do this job >>> wonderfully but I do not know how to deal with this problem in Org >>> mode >> >> The following FAQ should help: >> >> http://orgmode.org/worg/org-faq.php#diary-sexp-in-org-files >> >> - Matt >> > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode