emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Organizing a students live
@ 2009-12-18 10:48 Thomas Bach
  2009-12-18 13:31 ` Giovanni Ridolfi
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Thomas Bach @ 2009-12-18 10:48 UTC (permalink / raw)
  To: Emacs-orgmode

Hello,

I came to org-mode through the Tutorial of John Wiegley[1] and I'm
loving it! A great thanks to all of you who are working on this awesome
piece of code.

Actually I'm trying to integrate all my university stuff into my
org-files and I'm a bit stuck.
All my university stuff means: there is a certain date when a semester
starts and another one when it ends.
During that time I have to go to a couple of classes which usually have
"homeworks" related to them. In addition there are vacations (hooray!)
and holidays.
At the end of a semester some examens and theses need to be written.

How would you guys express all this in an org-file?

I solved the start, end and vacation thing like this:
------------------------------------------------------------
** APPT segundo cuatrimestre
   SCHEDULED: <2010-02-08 Mon>
*** vacaciones
    SCHEDULED: <2010-03-15 Mon>--<2010-03-19 Fri>
*** finaliza segundo cuatrimestre
    DEADLINE: <2010-06-04 Fri>
------------------------------------------------------------

Examens are APPTs too. Well, it works, but to me it doesn't seem to be
the proper way to do all this.
Espacially I have no idea how to integrate the classes and their
homeworks now.

Greets,
        Thomas.


Footnotes: 
[1]  http://www.newartisans.com/2007/08/using-org-mode-as-a-day-planner.html

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Organizing a students live
  2009-12-18 10:48 Organizing a students live Thomas Bach
@ 2009-12-18 13:31 ` Giovanni Ridolfi
  2009-12-18 14:41 ` Darlan Cavalcante Moreira
  2009-12-19  9:16 ` Jan Böcker
  2 siblings, 0 replies; 24+ messages in thread
From: Giovanni Ridolfi @ 2009-12-18 13:31 UTC (permalink / raw)
  To: Thomas Bach; +Cc: Emacs-orgmode

Thomas Bach <bachth@uni-mainz.de> writes:

Hi, Thomas,
>
> Actually I'm trying to integrate all my university stuff into my
> org-files and I'm a bit stuck.
> All my university stuff means: there is a certain date when a semester
> starts and another one when it ends.

> ** APPT segundo cuatrimestre
>    SCHEDULED: <2010-02-08 Mon>
I'd use only timestamps and not SCHEDULE or DEADLINES, and not
appointments  for the beginning and the end of the semester

** APPT segundo cuatrimestre starts
     <2010-02-08 Mon>
*** vacaciones
     <2010-03-15 Mon>--<2010-03-19 Fri>
*** finaliza segundo cuatrimestre
      <2010-06-04 Fri>

> During that time I have to go to a couple of classes which usually have
> "homeworks" related to them. 

I suggest to you to write down the classes (with the tag :class:, if you want )
and the corresponding  homeworks to do ... or TODO ? ;-)

So your file may become:

** segundo cuatrimestre starts
     <2010-02-08 Mon>

*** org-mode :class:
**** read the manual :homework:
   SCHEDULED: <2010-02-10 Wed>
I shall read the manual and I will start today
**** TODO write a summary of the manual 
    DEADLINE: <2010-03-10 Wed>
Carsten wants my summary for today!! Panic on the street!!

*** finaliza segundo cuatrimestre
      <2010-06-04 Fri>

hth
Giovanni

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Organizing a students live
  2009-12-18 10:48 Organizing a students live Thomas Bach
  2009-12-18 13:31 ` Giovanni Ridolfi
@ 2009-12-18 14:41 ` Darlan Cavalcante Moreira
  2009-12-19  9:16 ` Jan Böcker
  2 siblings, 0 replies; 24+ messages in thread
From: Darlan Cavalcante Moreira @ 2009-12-18 14:41 UTC (permalink / raw)
  To: Thomas Bach; +Cc: Emacs-orgmode


The best thing about org-mode is that it is very flexible and anyway you fell
comfortable with is good way. For me, I prefer to use SCHEDULED and DEADLINE
only for tasks and active time stamps for appointments or special dates
(birthdays, for example).

For instance, if you have Math classes on Mondays and Wednesdays and a Physics
classes on Tuesdays and Thursdays you could use active time stamps for the
actual class and SCHEDULE and DEADLINE for the tasks and tests you have to
do. See below an example
,----
| * Classes
|   :PROPERTIES:
|   :CATEGORY: Classes
|   :END:
| *** Math class
|     <2009-12-14 Mon +7d 8:00-10:00>
|     <2009-12-16 Wed +7d 8:00-10:00>
| 
| ***** Tests
|       :PROPERTIES:
|       :CATEGORY: Math Tests
|       :END:
| ******* TODO Study for the fist test
|         DEADLINE: <2010-01-18 Mon>
|         Here you could put what you need to study
| ******* TODO Study for the second test
|         DEADLINE: <2010-02-22 Mon -20d>
|         etc etc
| 
| 
| ***** Homeworks
|       :PROPERTIES:
|       :CATEGORY: Math Homeworks
|       :END:
| ******* TODO Do homework from day [2009-12-14 Mon]
|         DEADLINE: <2009-12-21 Mon>        
|         
| *** Physics class
|     <2009-12-15 Tue +7d 10:00-11:30>
|     <2009-12-17 Thu +7d 10:00-11:30>
| 
| ***** Tests
| ***** Homeworks
`----

The CATEGORY property is useful to easily differentiate in the agenda view which
class a "study task" belongs to, but you could also just add it to the headline
and forget about the category. Also, deadlines are shown in the agenda 14 days
before they are due (by default), but you may change this as I did in the second
Math test (more days for difficult tests and less days for easy ones).

You could also use attachments to add PDF files to the "study tasks",
etc. Org-mode is really powerful.

- Darlan Cavalcante


At Fri, 18 Dec 2009 11:48:40 +0100,
Thomas Bach <bachth@uni-mainz.de> wrote:
> 
> Hello,
> 
> I came to org-mode through the Tutorial of John Wiegley[1] and I'm
> loving it! A great thanks to all of you who are working on this awesome
> piece of code.
> 
> Actually I'm trying to integrate all my university stuff into my
> org-files and I'm a bit stuck.
> All my university stuff means: there is a certain date when a semester
> starts and another one when it ends.
> During that time I have to go to a couple of classes which usually have
> "homeworks" related to them. In addition there are vacations (hooray!)
> and holidays.
> At the end of a semester some examens and theses need to be written.
> 
> How would you guys express all this in an org-file?
> 
> I solved the start, end and vacation thing like this:
> ------------------------------------------------------------
> ** APPT segundo cuatrimestre
>    SCHEDULED: <2010-02-08 Mon>
> *** vacaciones
>     SCHEDULED: <2010-03-15 Mon>--<2010-03-19 Fri>
> *** finaliza segundo cuatrimestre
>     DEADLINE: <2010-06-04 Fri>
> ------------------------------------------------------------
> 
> Examens are APPTs too. Well, it works, but to me it doesn't seem to be
> the proper way to do all this.
> Espacially I have no idea how to integrate the classes and their
> homeworks now.
> 
> Greets,
>         Thomas.
> 
> 
> Footnotes: 
> [1]  http://www.newartisans.com/2007/08/using-org-mode-as-a-day-planner.html
> 
> 
> 
> _______________________________________________
> 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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Organizing a students live
  2009-12-18 10:48 Organizing a students live Thomas Bach
  2009-12-18 13:31 ` Giovanni Ridolfi
  2009-12-18 14:41 ` Darlan Cavalcante Moreira
@ 2009-12-19  9:16 ` Jan Böcker
  2009-12-19 11:20   ` Thomas Bach
  2 siblings, 1 reply; 24+ messages in thread
From: Jan Böcker @ 2009-12-19  9:16 UTC (permalink / raw)
  To: Thomas Bach; +Cc: Emacs-orgmode

I study computer science in the first semester. I have one org file
dedicated to university (~/org/studium.org).

In this org file, there will be one top-level heading for each semester
(currently there is only one -
"Wintersemster 09/10 [2009-10-01 Do]--[2010-03-31 Mi]"). You see that I
added the beginning and end of the semester as inactive timestamps.

Under the heading for the semester, I have one subtree for general
information such as vacation periods (denoted as a timespan:
"<2009-12-21 Mo>--<2010-01-03 Sa>"), examens and links to the websites
of my classes (to download the homework for the week).

Following that, I have a subtree for each calendar week, which looks
like this:

** Week 48 from [2009-11-23 Mo] to [2009-11-29 So]
**** Class 1
     General information about this week's curriculum sometimes goes
     here.
****** Class 1 Lecture <2009-11-23 Mo 16:00>
       [Link to the slides used in this lecture]	
	
       Class notes for the first lecture of the week go here.
       When I did not type it directly in org-mode (with the view
       narrowed to this subtree), there will be a link to the
       hand-written notes (I use Xournal on a Tablet PC), to some
       scanned image of paper, or at least a reference to the script
       to tell me where in the curriculum we left off.
****** Class 1 Lecture <2009-11-25 Mi 16:00>
       Class notes for the second one go here.
****** TODO Class 1 Homework [Link to Homework PDF]
       [Link to my solution of the exercises (Xournal)]
       When this homework has been graded the following week,
       (a link to) the notes I took on exercises I had made mistakes in
       will go here.
**** Class 2
     (repeat the same structure for the other classes)

At the end of this org file, there is a subtree named "Future", where
the entries for the next weeks are ready to be moved to the end of the
main tree. You can generate this fairly quickly if you create one
"template" subtree and then use M-x org-clone-subtree-with-time-shift
repeatedly to create a copy with all timestamps shifted one week forward.


This system works very well for me so far. I have a folder structure
similar to the subtree structure on disk
(~/uni/semester/calendar-week/class[/homework]) where I store all the
files I link to. This way, I can be sure that if I take ~/org/ and
~/uni/ with me, I have all of my most important data. I do not use
repeating timestamps because having a separate subtree for each
occurence of a lecture enables me to jump to the appropriate notes, etc.
right from my agenda view.

I have also tagged the nodes below each week by class and by type
(Lecture, Exercise), so I could do queries like "show me all Lecture
notes for Class 1", but so far I have not needed that. However, it does
not hurt to have it in the template, I might use it later.

Of course, the Homework entry gets assigned a DEADLINE when I download
the exercise .pdf and add the link.


I hope the above text is comprehensible enough; if there are any
questions, feel free to ask! I would also be interested in how other
students use Org. If it were not for org-mode, my class notes would be
in a messy pile of paper instead of a few keystrokes away...

Greetings from Germany,
	Jan

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Organizing a students live
  2009-12-19  9:16 ` Jan Böcker
@ 2009-12-19 11:20   ` Thomas Bach
  2009-12-20 22:54     ` Daniel Martins
  2009-12-21 17:23     ` Jan Böcker
  0 siblings, 2 replies; 24+ messages in thread
From: Thomas Bach @ 2009-12-19 11:20 UTC (permalink / raw)
  To: Jan Böcker; +Cc: Emacs-orgmode

Hi Jan,

interesting setup, it never came to my mind to organize everything on a
weekly basis. Well, it makes sense. :)
Why do you put inactive timestamps for beginning and end of the
semester? Doesn’t that mean that it won’t show up in the agenda view?
How are you handling examens?

With the hints of Giovanni and Darlan I actually came up with something
like this:

* Calendario
  :PROPERTIES:
  :CATEGORY: Calendario
  :END:
** segundo cuatrimestre
   <2010-02-08 Mon>
*** vacaciones
    <2010-03-15 Mon>--<2010-03-19 Fri>
    <2010-04-02 Fri>--<2010-04-12 Mon>
*** finaliza segundo cuatrimestre
    <2010-06-04 Fri>

For the rare dates of the semester. I like this to get a fast overview
when planing travels etc..

For classes I created a tree like the following:

* Classes
** Inteligencia Artificial
   :PROPERTIES:
   :CATEGORY: IA
   :END:
*** teoría
    <2009-12-10 Thu 11:00-14:00 +1w>
*** examen
    :PROPERTIES:
    :CATEGORY: IA examen
    :END:
**** practicas
     <2010-01-14 Thu 11:00>
**** teoria 
     <2010-01-29 Fri 09:00>
*** trabajos
**** presentar el texto
     DEADLINE: <2010-01-07 Thu>
***** TODO leer el texto y resumir

But there are some still things that don’t fit together e.g. that
classes (teoría) show up on vacations…
BTW: Is it possible to inherit from higher CATEGORYs instead of
overwriting it? So that I could only write :CATEGORY: examen?

I will think and try out a bit more with all this over the weekend.

Best regards,
     Thomas Bach.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Organizing a students live
  2009-12-19 11:20   ` Thomas Bach
@ 2009-12-20 22:54     ` Daniel Martins
  2009-12-20 23:52       ` Matt Lundin
  2009-12-21 17:23     ` Jan Böcker
  1 sibling, 1 reply; 24+ messages in thread
From: Daniel Martins @ 2009-12-20 22:54 UTC (permalink / raw)
  To: Thomas Bach; +Cc: Emacs-orgmode

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

Daniel
2009/12/19 Thomas Bach <bachth@uni-mainz.de>:
> Hi Jan,
>
> interesting setup, it never came to my mind to organize everything on a
> weekly basis. Well, it makes sense. :)
> Why do you put inactive timestamps for beginning and end of the
> semester? Doesn’t that mean that it won’t show up in the agenda view?
> How are you handling examens?
>
> With the hints of Giovanni and Darlan I actually came up with something
> like this:
>
> * Calendario
>  :PROPERTIES:
>  :CATEGORY: Calendario
>  :END:
> ** segundo cuatrimestre
>   <2010-02-08 Mon>
> *** vacaciones
>    <2010-03-15 Mon>--<2010-03-19 Fri>
>    <2010-04-02 Fri>--<2010-04-12 Mon>
> *** finaliza segundo cuatrimestre
>    <2010-06-04 Fri>
>
> For the rare dates of the semester. I like this to get a fast overview
> when planing travels etc..
>
> For classes I created a tree like the following:
>
> * Classes
> ** Inteligencia Artificial
>   :PROPERTIES:
>   :CATEGORY: IA
>   :END:
> *** teoría
>    <2009-12-10 Thu 11:00-14:00 +1w>
> *** examen
>    :PROPERTIES:
>    :CATEGORY: IA examen
>    :END:
> **** practicas
>     <2010-01-14 Thu 11:00>
> **** teoria
>     <2010-01-29 Fri 09:00>
> *** trabajos
> **** presentar el texto
>     DEADLINE: <2010-01-07 Thu>
> ***** TODO leer el texto y resumir
>
> But there are some still things that don’t fit together e.g. that
> classes (teoría) show up on vacations…
> BTW: Is it possible to inherit from higher CATEGORYs instead of
> overwriting it? So that I could only write :CATEGORY: examen?
>
> I will think and try out a bit more with all this over the weekend.
>
> Best regards,
>     Thomas Bach.
>
>
> _______________________________________________
> 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
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Organizing a students live
  2009-12-20 22:54     ` Daniel Martins
@ 2009-12-20 23:52       ` Matt Lundin
  2009-12-21 15:54         ` Daniel Martins
  0 siblings, 1 reply; 24+ messages in thread
From: Matt Lundin @ 2009-12-20 23:52 UTC (permalink / raw)
  To: Daniel Martins; +Cc: Emacs-orgmode

Daniel Martins <danielemc@gmail.com> 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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Organizing a students live
  2009-12-20 23:52       ` Matt Lundin
@ 2009-12-21 15:54         ` Daniel Martins
  2009-12-22 15:30           ` Matthew Lundin
  2009-12-26 11:33           ` Carsten Dominik
  0 siblings, 2 replies; 24+ messages in thread
From: Daniel Martins @ 2009-12-21 15:54 UTC (permalink / raw)
  To: Matt Lundin; +Cc: Emacs-orgmode

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 (= 1 (calendar-day-of-week date)) (diary-block 2 16 2009 4 20 2009))>

is not an example of simplicity and visibility for a quite common feature!

Maybe as a suggestion we could encapsulate such a huge expression in a
simpler org-mode function ?

Daniel


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’s derived from diary-block) between two dates and a
weekday. The following function also recognizes holidays and won’t
send you to school on those days… :)

    (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
             (<= date1 d)
             (<= d date2)
             (= (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 <mdl@imapmail.org>:
> Daniel Martins <danielemc@gmail.com> 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
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Organizing a students live
  2009-12-19 11:20   ` Thomas Bach
  2009-12-20 22:54     ` Daniel Martins
@ 2009-12-21 17:23     ` Jan Böcker
  1 sibling, 0 replies; 24+ messages in thread
From: Jan Böcker @ 2009-12-21 17:23 UTC (permalink / raw)
  To: Thomas Bach; +Cc: Emacs-orgmode

Thomas Bach wrote:

> Why do you put inactive timestamps for beginning and end of the
> semester? Doesn’t that mean that it won’t show up in the agenda view?

I do not need the agenda to tell me every day what semester I am in.
When I need this information in the agenda view, I just press "[" to
show inactive timestamps, too.

> How are you handling examens?

Examens are appointments, which go into the "general information"
subtree for the semester, get a TODO keyword and a DEADLINE to remind me
to start the preparations early enough.


> But there are some still things that don’t fit together e.g. that
> classes (teoría) show up on vacations…

I mostly avoid this problem as a side effect of having a subtree for
each week; for weeks in which there are no classes, there will simply be
no subtree present.

Because I need a subtree for each occurence of a lecture anyway (to link
to related information and store (links to) my class notes), that does
not create additional overhead for me.

I face this problem with weekly exercises; because I usually do not take
notes then, there are no separate subtrees for these. (If I do take
notes, they go to the appropriate Homework subtree.) I do not use
org-mode to remind me of these at all, as I have my schedule committed
to memory by now. (I do have the schedule in an .org-file for reference.)

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Organizing a students live
  2009-12-21 15:54         ` Daniel Martins
@ 2009-12-22 15:30           ` Matthew Lundin
  2009-12-26 11:33           ` Carsten Dominik
  1 sibling, 0 replies; 24+ messages in thread
From: Matthew Lundin @ 2009-12-22 15:30 UTC (permalink / raw)
  To: Daniel Martins; +Cc: Matt Lundin, Emacs-orgmode

Daniel Martins <danielemc@gmail.com> 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 (= 1 (calendar-day-of-week date)) (diary-block 2 16 2009 4 20 2009))>
>
> 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.
:) 

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’s derived from diary-block) between two dates and a
> weekday. The following function also recognizes holidays and won’t
> send you to school on those days… :)
>
>     (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
>              (<= date1 d)
>              (<= d date2)
>              (= (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 <mdl@imapmail.org>:
>> Daniel Martins <danielemc@gmail.com> 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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Re: Organizing a students live
  2009-12-21 15:54         ` Daniel Martins
  2009-12-22 15:30           ` Matthew Lundin
@ 2009-12-26 11:33           ` Carsten Dominik
  2009-12-27  0:51             ` Daniel Martins
  1 sibling, 1 reply; 24+ messages in thread
From: Carsten Dominik @ 2009-12-26 11:33 UTC (permalink / raw)
  To: Daniel Martins; +Cc: Matt Lundin, Emacs-orgmode

Hi Daniel,

I think it is a good idea to add such a function to org-mode.  But I
am not sure if skipping holidays is the best, because Universities
also have lecture-free weeks etc.

So I am more thinking about a function like this (untested)

(defun org-diary-class (m1 d1 y1 m2 d2 y2 dayname &rest skip-weeks)
   "Entry applies if date is between dates on DAYNAME, but skips SKIP- 
WEEKS.
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.  The weeks are ISO week numbers where
the item should not apply."
   (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)))
     (and
      (<= date1 d)
      (<= d date2)
      (= (calendar-day-of-week date) dayname)
      (or (not skip-weeks)
	 (progn
	   (require 'cal-iso)
	   (not (member (car (calendar-iso-from-absolute d)) skip-weeks))))
      entry)))


What do you think?

- Carsten

On Dec 21, 2009, at 4:54 PM, Daniel Martins wrote:

> 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 (= 1 (calendar-day-of-week date)) (diary-block 2 16 2009 4  
> 20 2009))>
>
> is not an example of simplicity and visibility for a quite common  
> feature!
>
> Maybe as a suggestion we could encapsulate such a huge expression in a
> simpler org-mode function ?
>
> Daniel
>
>
> 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’s derived from diary-block) between two dates and a
> weekday. The following function also recognizes holidays and won’t
> send you to school on those days… :)
>
>    (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
>             (<= date1 d)
>             (<= d date2)
>             (= (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 <mdl@imapmail.org>:
>> Daniel Martins <danielemc@gmail.com> 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
>>
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Re: Organizing a students live
  2009-12-26 11:33           ` Carsten Dominik
@ 2009-12-27  0:51             ` Daniel Martins
  2009-12-28 18:47               ` Carsten Dominik
  0 siblings, 1 reply; 24+ messages in thread
From: Daniel Martins @ 2009-12-27  0:51 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Matt Lundin, Emacs-orgmode

I liked the idea of org-diary-class!

About avoiding holidays and certain weeks:

I used remind and wyrd for a while  and they are a quite good software
for dealing with such appts.

There we have the OMIT function where we determine holidays and other
non-working days including Sat and Sundays


Normally we have an OMIT list at the beginning of file

 Some functions simply omit those dates

Other expressions use another keyword AFTER (or BEFORE)  to change
OMIT behaviour

like
23 Mar AFTER OMIT "Bank payment"

eg If 23 Mar is in Saturday it will appear in Monday

This preamble is just to say 2 things:

1) remind/wyrd could be used as a benchmark for some of the calendar
isuues we have

2) I do not know if the week number in a year is a practical way of
setting exceptions to org-diary-class

Daniel

PS Wyrd page is

http://pessimization.com/software/wyrd/




2009/12/26 Carsten Dominik <carsten.dominik@gmail.com>:
> Hi Daniel,
>
> I think it is a good idea to add such a function to org-mode.  But I
> am not sure if skipping holidays is the best, because Universities
> also have lecture-free weeks etc.
>
> So I am more thinking about a function like this (untested)
>
> (defun org-diary-class (m1 d1 y1 m2 d2 y2 dayname &rest skip-weeks)
>  "Entry applies if date is between dates on DAYNAME, but skips SKIP-WEEKS.
> 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.  The weeks are ISO week numbers where
> the item should not apply."
>  (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)))
>    (and
>     (<= date1 d)
>     (<= d date2)
>     (= (calendar-day-of-week date) dayname)
>     (or (not skip-weeks)
>         (progn
>           (require 'cal-iso)
>           (not (member (car (calendar-iso-from-absolute d)) skip-weeks))))
>     entry)))
>
>
> What do you think?
>
> - Carsten
>
> On Dec 21, 2009, at 4:54 PM, Daniel Martins wrote:
>
>> 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 (= 1 (calendar-day-of-week date)) (diary-block 2 16 2009 4 20
>> 2009))>
>>
>> is not an example of simplicity and visibility for a quite common feature!
>>
>> Maybe as a suggestion we could encapsulate such a huge expression in a
>> simpler org-mode function ?
>>
>> Daniel
>>
>>
>> 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’s derived from diary-block) between two dates and a
>> weekday. The following function also recognizes holidays and won’t
>> send you to school on those days… :)
>>
>>   (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
>>            (<= date1 d)
>>            (<= d date2)
>>            (= (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 <mdl@imapmail.org>:
>>>
>>> Daniel Martins <danielemc@gmail.com> 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
>>>
>>
>
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Re: Organizing a students live
  2009-12-27  0:51             ` Daniel Martins
@ 2009-12-28 18:47               ` Carsten Dominik
  2009-12-28 21:09                 ` Daniel Martins
  0 siblings, 1 reply; 24+ messages in thread
From: Carsten Dominik @ 2009-12-28 18:47 UTC (permalink / raw)
  To: Daniel Martins; +Cc: Matt Lundin, Emacs-orgmode

Hi Daniel,

On Dec 27, 2009, at 1:51 AM, Daniel Martins wrote:

> I liked the idea of org-diary-class!

I have added the function now to org-agenda.el

>
> About avoiding holidays and certain weeks:
>
> I used remind and wyrd for a while  and they are a quite good software
> for dealing with such appts.
>
> There we have the OMIT function where we determine holidays and other
> non-working days including Sat and Sundays
>
>
> Normally we have an OMIT list at the beginning of file
>
> Some functions simply omit those dates
>
> Other expressions use another keyword AFTER (or BEFORE)  to change
> OMIT behaviour
>
> like
> 23 Mar AFTER OMIT "Bank payment"
>
> eg If 23 Mar is in Saturday it will appear in Monday
>
> This preamble is just to say 2 things:
>
> 1) remind/wyrd could be used as a benchmark for some of the calendar
> isuues we have
>
> 2) I do not know if the week number in a year is a practical way of
> setting exceptions to org-diary-class
>
> Daniel
>
> PS Wyrd page is
>
> http://pessimization.com/software/wyrd/

Interesting.  But too complex for now - and I actually do prefer local  
control.

- Carsten


>
>
>
>
> 2009/12/26 Carsten Dominik <carsten.dominik@gmail.com>:
>> Hi Daniel,
>>
>> I think it is a good idea to add such a function to org-mode.  But I
>> am not sure if skipping holidays is the best, because Universities
>> also have lecture-free weeks etc.
>>
>> So I am more thinking about a function like this (untested)
>>
>> (defun org-diary-class (m1 d1 y1 m2 d2 y2 dayname &rest skip-weeks)
>>  "Entry applies if date is between dates on DAYNAME, but skips SKIP- 
>> WEEKS.
>> 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.  The weeks are ISO week numbers where
>> the item should not apply."
>>  (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)))
>>    (and
>>     (<= date1 d)
>>     (<= d date2)
>>     (= (calendar-day-of-week date) dayname)
>>     (or (not skip-weeks)
>>         (progn
>>           (require 'cal-iso)
>>           (not (member (car (calendar-iso-from-absolute d)) skip- 
>> weeks))))
>>     entry)))
>>
>>
>> What do you think?
>>
>> - Carsten
>>
>> On Dec 21, 2009, at 4:54 PM, Daniel Martins wrote:
>>
>>> 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 (= 1 (calendar-day-of-week date)) (diary-block 2 16 2009 4  
>>> 20
>>> 2009))>
>>>
>>> is not an example of simplicity and visibility for a quite common  
>>> feature!
>>>
>>> Maybe as a suggestion we could encapsulate such a huge expression  
>>> in a
>>> simpler org-mode function ?
>>>
>>> Daniel
>>>
>>>
>>> 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’s derived from diary-block) between two dates  
>>> and a
>>> weekday. The following function also recognizes holidays and won’t
>>> send you to school on those days… :)
>>>
>>>   (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
>>>            (<= date1 d)
>>>            (<= d date2)
>>>            (= (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 <mdl@imapmail.org>:
>>>>
>>>> Daniel Martins <danielemc@gmail.com> 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
>>>>
>>>
>>
>>

- Carsten

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Re: Organizing a students live
  2009-12-28 18:47               ` Carsten Dominik
@ 2009-12-28 21:09                 ` Daniel Martins
  2010-01-03 13:17                   ` Carsten Dominik
  0 siblings, 1 reply; 24+ messages in thread
From: Daniel Martins @ 2009-12-28 21:09 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Matt Lundin, Emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 7503 bytes --]

> Interesting.  But too complex for now - and I actually do prefer local
control.

I know it is complex.

I thought about the first steps

I was thinking about a variable (list?) with predefined holidays

or better omit-holidays

such as org-omit-holidays

we could add the omit dates in any place
  (add-to-list 'org-omit-holidays "25 Dec")
  (add-to-list 'org-omit-holidays "1 Jan")
  (add-to-list 'org-omit-holidays "1 May")
etc.


Then we could change (adapt) the

function calendar-check-holydays from holidays.el


I did a search-replace to something like this:

(defun org-check-calendar-omit-holidays (date)
  "Check the list of org-omit-holidays for any that occur on DATE.
The value returned is a list of strings of relevant org-omit-holiday
descriptions.
The org-omit-holidays are those in the list `org-omit-holidays'."
  (let ((displayed-month (extract-calendar-month date))
        (displayed-year (extract-calendar-year date))
        (org-omit-holiday-list))
    (dolist (h (calendar-org-omit-holiday-list))
      (if (calendar-date-equal date (car h))
          (setq org-omit-holiday-list (append org-omit-holiday-list (cdr
h)))))
    org-omit-holiday-list))

with these adaptation we could use a slighly changed  version of the
"diary-schedule" function  I sent before.

I did not go further nor tested it.

Thinking again now: I think it is better to avoid holidays than week
numbers. The problem is that we have to decide which holidays are "really"
holidays and not rely on the holidays variables that come with Emacs.


Daniel

2009/12/28 Carsten Dominik <carsten.dominik@gmail.com>

> Hi Daniel,
>
>
> On Dec 27, 2009, at 1:51 AM, Daniel Martins wrote:
>
>  I liked the idea of org-diary-class!
>>
>
> I have added the function now to org-agenda.el
>
>
>
>> About avoiding holidays and certain weeks:
>>
>> I used remind and wyrd for a while  and they are a quite good software
>> for dealing with such appts.
>>
>> There we have the OMIT function where we determine holidays and other
>> non-working days including Sat and Sundays
>>
>>
>> Normally we have an OMIT list at the beginning of file
>>
>> Some functions simply omit those dates
>>
>> Other expressions use another keyword AFTER (or BEFORE)  to change
>> OMIT behaviour
>>
>> like
>> 23 Mar AFTER OMIT "Bank payment"
>>
>> eg If 23 Mar is in Saturday it will appear in Monday
>>
>> This preamble is just to say 2 things:
>>
>> 1) remind/wyrd could be used as a benchmark for some of the calendar
>> isuues we have
>>
>> 2) I do not know if the week number in a year is a practical way of
>> setting exceptions to org-diary-class
>>
>> Daniel
>>
>> PS Wyrd page is
>>
>> http://pessimization.com/software/wyrd/
>>
>
> Interesting.  But too complex for now - and I actually do prefer local
> control.
>
> - Carsten
>
>
>
>
>>
>>
>>
>> 2009/12/26 Carsten Dominik <carsten.dominik@gmail.com>:
>>
>>> Hi Daniel,
>>>
>>> I think it is a good idea to add such a function to org-mode.  But I
>>> am not sure if skipping holidays is the best, because Universities
>>> also have lecture-free weeks etc.
>>>
>>> So I am more thinking about a function like this (untested)
>>>
>>> (defun org-diary-class (m1 d1 y1 m2 d2 y2 dayname &rest skip-weeks)
>>>  "Entry applies if date is between dates on DAYNAME, but skips
>>> SKIP-WEEKS.
>>> 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.  The weeks are ISO week numbers where
>>> the item should not apply."
>>>  (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)))
>>>   (and
>>>    (<= date1 d)
>>>    (<= d date2)
>>>    (= (calendar-day-of-week date) dayname)
>>>    (or (not skip-weeks)
>>>        (progn
>>>          (require 'cal-iso)
>>>          (not (member (car (calendar-iso-from-absolute d)) skip-weeks))))
>>>    entry)))
>>>
>>>
>>> What do you think?
>>>
>>> - Carsten
>>>
>>> On Dec 21, 2009, at 4:54 PM, Daniel Martins wrote:
>>>
>>>  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 (= 1 (calendar-day-of-week date)) (diary-block 2 16 2009 4 20
>>>> 2009))>
>>>>
>>>> is not an example of simplicity and visibility for a quite common
>>>> feature!
>>>>
>>>> Maybe as a suggestion we could encapsulate such a huge expression in a
>>>> simpler org-mode function ?
>>>>
>>>> Daniel
>>>>
>>>>
>>>> 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’s derived from diary-block) between two dates and a
>>>> weekday. The following function also recognizes holidays and won’t
>>>> send you to school on those days… :)
>>>>
>>>>  (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
>>>>           (<= date1 d)
>>>>           (<= d date2)
>>>>           (= (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 <mdl@imapmail.org>:
>>>>
>>>>>
>>>>> Daniel Martins <danielemc@gmail.com> 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
>>>>>
>>>>>
>>>>
>>>
>>>
> - Carsten
>
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 9830 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Re: Organizing a students live
  2009-12-28 21:09                 ` Daniel Martins
@ 2010-01-03 13:17                   ` Carsten Dominik
  2010-02-10 19:02                     ` Daniel Martins
  0 siblings, 1 reply; 24+ messages in thread
From: Carsten Dominik @ 2010-01-03 13:17 UTC (permalink / raw)
  To: Daniel Martins; +Cc: Matt Lundin, Emacs-orgmode


On Dec 28, 2009, at 10:09 PM, Daniel Martins wrote:

> > Interesting.  But too complex for now - and I actually do prefer  
> local control.
>
> I know it is complex.
>
> I thought about the first steps
>
> I was thinking about a variable (list?) with predefined holidays
>
> or better omit-holidays
>
> such as org-omit-holidays
>
> we could add the omit dates in any place
>   (add-to-list 'org-omit-holidays "25 Dec")
>   (add-to-list 'org-omit-holidays "1 Jan")
>   (add-to-list 'org-omit-holidays "1 May")
> etc.
>

Hmm, this is a possibility - but I don't have the time now to  
implement it.
And then the question remains: What exactly should be omitted on these  
days?
Everything? - probably not.  So I don't see how this leads to useful  
control, unless
we have a really fine-grained control for each entry.

>
> Then we could change (adapt) the
>
> function calendar-check-holydays from holidays.el
>
>
> I did a search-replace to something like this:
>
> (defun org-check-calendar-omit-holidays (date)
>   "Check the list of org-omit-holidays for any that occur on DATE.
> The value returned is a list of strings of relevant org-omit-holiday  
> descriptions.
> The org-omit-holidays are those in the list `org-omit-holidays'."
>   (let ((displayed-month (extract-calendar-month date))
>         (displayed-year (extract-calendar-year date))
>         (org-omit-holiday-list))
>     (dolist (h (calendar-org-omit-holiday-list))
>       (if (calendar-date-equal date (car h))
>           (setq org-omit-holiday-list (append org-omit-holiday-list  
> (cdr h)))))
>     org-omit-holiday-list))
>
> with these adaptation we could use a slighly changed  version of the  
> "diary-schedule" function  I sent before.
>
> I did not go further nor tested it.
>
> Thinking again now: I think it is better to avoid holidays than week  
> numbers. The problem is that we have to decide which holidays are  
> "really" holidays and not rely on the holidays variables that come  
> with Emacs.


I do not agree.  Lectures are not only skipped on holidays, but also  
on other
days, so a more general approach is needed.

>
>
> Daniel
>
> 2009/12/28 Carsten Dominik <carsten.dominik@gmail.com>
> Hi Daniel,
>
>
> On Dec 27, 2009, at 1:51 AM, Daniel Martins wrote:
>
> I liked the idea of org-diary-class!
>
> I have added the function now to org-agenda.el
>
>
>
> About avoiding holidays and certain weeks:
>
> I used remind and wyrd for a while  and they are a quite good software
> for dealing with such appts.
>
> There we have the OMIT function where we determine holidays and other
> non-working days including Sat and Sundays
>
>
> Normally we have an OMIT list at the beginning of file
>
> Some functions simply omit those dates
>
> Other expressions use another keyword AFTER (or BEFORE)  to change
> OMIT behaviour
>
> like
> 23 Mar AFTER OMIT "Bank payment"
>
> eg If 23 Mar is in Saturday it will appear in Monday
>
> This preamble is just to say 2 things:
>
> 1) remind/wyrd could be used as a benchmark for some of the calendar
> isuues we have
>
> 2) I do not know if the week number in a year is a practical way of
> setting exceptions to org-diary-class
>
> Daniel
>
> PS Wyrd page is
>
> http://pessimization.com/software/wyrd/
>
> Interesting.  But too complex for now - and I actually do prefer  
> local control.
>
> - Carsten
>
>
>
>
>
>
>
> 2009/12/26 Carsten Dominik <carsten.dominik@gmail.com>:
> Hi Daniel,
>
> I think it is a good idea to add such a function to org-mode.  But I
> am not sure if skipping holidays is the best, because Universities
> also have lecture-free weeks etc.
>
> So I am more thinking about a function like this (untested)
>
> (defun org-diary-class (m1 d1 y1 m2 d2 y2 dayname &rest skip-weeks)
>  "Entry applies if date is between dates on DAYNAME, but skips SKIP- 
> WEEKS.
> 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.  The weeks are ISO week numbers where
> the item should not apply."
>  (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)))
>   (and
>    (<= date1 d)
>    (<= d date2)
>    (= (calendar-day-of-week date) dayname)
>    (or (not skip-weeks)
>        (progn
>          (require 'cal-iso)
>          (not (member (car (calendar-iso-from-absolute d)) skip- 
> weeks))))
>    entry)))
>
>
> What do you think?
>
> - Carsten
>
> On Dec 21, 2009, at 4:54 PM, Daniel Martins wrote:
>
> 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 (= 1 (calendar-day-of-week date)) (diary-block 2 16 2009 4 20
> 2009))>
>
> is not an example of simplicity and visibility for a quite common  
> feature!
>
> Maybe as a suggestion we could encapsulate such a huge expression in a
> simpler org-mode function ?
>
> Daniel
>
>
> 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’s derived from diary-block) between two dates and a
> weekday. The following function also recognizes holidays and won’t
> send you to school on those days… :)
>
>  (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
>           (<= date1 d)
>           (<= d date2)
>           (= (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 <mdl@imapmail.org>:
>
> Daniel Martins <danielemc@gmail.com> 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
>
>
>
>
>
> - Carsten
>
>
>
>

- Carsten

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Re: Organizing a students live
  2010-01-03 13:17                   ` Carsten Dominik
@ 2010-02-10 19:02                     ` Daniel Martins
       [not found]                       ` <m3pr4chpee.fsf@buster.johnrakestraw.com>
  0 siblings, 1 reply; 24+ messages in thread
From: Daniel Martins @ 2010-02-10 19:02 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Matt Lundin, Emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 8010 bytes --]

Someone could send me an example of the use of the org-diary-class ??

Daniel

2010/1/3 Carsten Dominik <carsten.dominik@gmail.com>

>
> On Dec 28, 2009, at 10:09 PM, Daniel Martins wrote:
>
>  > Interesting.  But too complex for now - and I actually do prefer local
>> control.
>>
>> I know it is complex.
>>
>> I thought about the first steps
>>
>> I was thinking about a variable (list?) with predefined holidays
>>
>> or better omit-holidays
>>
>> such as org-omit-holidays
>>
>> we could add the omit dates in any place
>>  (add-to-list 'org-omit-holidays "25 Dec")
>>  (add-to-list 'org-omit-holidays "1 Jan")
>>  (add-to-list 'org-omit-holidays "1 May")
>> etc.
>>
>>
> Hmm, this is a possibility - but I don't have the time now to implement it.
> And then the question remains: What exactly should be omitted on these
> days?
> Everything? - probably not.  So I don't see how this leads to useful
> control, unless
> we have a really fine-grained control for each entry.
>
>
>
>> Then we could change (adapt) the
>>
>> function calendar-check-holydays from holidays.el
>>
>>
>> I did a search-replace to something like this:
>>
>> (defun org-check-calendar-omit-holidays (date)
>>  "Check the list of org-omit-holidays for any that occur on DATE.
>> The value returned is a list of strings of relevant org-omit-holiday
>> descriptions.
>> The org-omit-holidays are those in the list `org-omit-holidays'."
>>  (let ((displayed-month (extract-calendar-month date))
>>        (displayed-year (extract-calendar-year date))
>>        (org-omit-holiday-list))
>>    (dolist (h (calendar-org-omit-holiday-list))
>>      (if (calendar-date-equal date (car h))
>>          (setq org-omit-holiday-list (append org-omit-holiday-list (cdr
>> h)))))
>>    org-omit-holiday-list))
>>
>> with these adaptation we could use a slighly changed  version of the
>> "diary-schedule" function  I sent before.
>>
>> I did not go further nor tested it.
>>
>> Thinking again now: I think it is better to avoid holidays than week
>> numbers. The problem is that we have to decide which holidays are "really"
>> holidays and not rely on the holidays variables that come with Emacs.
>>
>
>
> I do not agree.  Lectures are not only skipped on holidays, but also on
> other
> days, so a more general approach is needed.
>
>
>
>>
>> Daniel
>>
>> 2009/12/28 Carsten Dominik <carsten.dominik@gmail.com>
>> Hi Daniel,
>>
>>
>> On Dec 27, 2009, at 1:51 AM, Daniel Martins wrote:
>>
>> I liked the idea of org-diary-class!
>>
>> I have added the function now to org-agenda.el
>>
>>
>>
>> About avoiding holidays and certain weeks:
>>
>> I used remind and wyrd for a while  and they are a quite good software
>> for dealing with such appts.
>>
>> There we have the OMIT function where we determine holidays and other
>> non-working days including Sat and Sundays
>>
>>
>> Normally we have an OMIT list at the beginning of file
>>
>> Some functions simply omit those dates
>>
>> Other expressions use another keyword AFTER (or BEFORE)  to change
>> OMIT behaviour
>>
>> like
>> 23 Mar AFTER OMIT "Bank payment"
>>
>> eg If 23 Mar is in Saturday it will appear in Monday
>>
>> This preamble is just to say 2 things:
>>
>> 1) remind/wyrd could be used as a benchmark for some of the calendar
>> isuues we have
>>
>> 2) I do not know if the week number in a year is a practical way of
>> setting exceptions to org-diary-class
>>
>> Daniel
>>
>> PS Wyrd page is
>>
>> http://pessimization.com/software/wyrd/
>>
>> Interesting.  But too complex for now - and I actually do prefer local
>> control.
>>
>> - Carsten
>>
>>
>>
>>
>>
>>
>>
>> 2009/12/26 Carsten Dominik <carsten.dominik@gmail.com>:
>> Hi Daniel,
>>
>> I think it is a good idea to add such a function to org-mode.  But I
>> am not sure if skipping holidays is the best, because Universities
>> also have lecture-free weeks etc.
>>
>> So I am more thinking about a function like this (untested)
>>
>> (defun org-diary-class (m1 d1 y1 m2 d2 y2 dayname &rest skip-weeks)
>>  "Entry applies if date is between dates on DAYNAME, but skips SKIP-WEEKS.
>> 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.  The weeks are ISO week numbers where
>> the item should not apply."
>>  (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)))
>>  (and
>>   (<= date1 d)
>>   (<= d date2)
>>   (= (calendar-day-of-week date) dayname)
>>   (or (not skip-weeks)
>>       (progn
>>         (require 'cal-iso)
>>         (not (member (car (calendar-iso-from-absolute d)) skip-weeks))))
>>   entry)))
>>
>>
>> What do you think?
>>
>> - Carsten
>>
>> On Dec 21, 2009, at 4:54 PM, Daniel Martins wrote:
>>
>> 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 (= 1 (calendar-day-of-week date)) (diary-block 2 16 2009 4 20
>> 2009))>
>>
>> is not an example of simplicity and visibility for a quite common feature!
>>
>> Maybe as a suggestion we could encapsulate such a huge expression in a
>> simpler org-mode function ?
>>
>> Daniel
>>
>>
>> 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’s derived from diary-block) between two dates and a
>> weekday. The following function also recognizes holidays and won’t
>> send you to school on those days… :)
>>
>>  (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
>>          (<= date1 d)
>>          (<= d date2)
>>          (= (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 <mdl@imapmail.org>:
>>
>> Daniel Martins <danielemc@gmail.com> 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
>>
>>
>>
>>
>>
>> - Carsten
>>
>>
>>
>>
>>
> - Carsten
>
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 9920 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Re: Organizing a students live
       [not found]                       ` <m3pr4chpee.fsf@buster.johnrakestraw.com>
@ 2010-02-10 19:23                         ` Daniel Martins
  2010-02-10 19:45                           ` Stephan Schmitt
  2010-02-10 22:20                           ` Nick Dokos
  0 siblings, 2 replies; 24+ messages in thread
From: Daniel Martins @ 2010-02-10 19:23 UTC (permalink / raw)
  To: John Rakestraw, emacs-orgmode@gnu.org


[-- Attachment #1.1: Type: text/plain, Size: 685 bytes --]

Thank you very much John. Incredibly fast answer !!!


BTW Is there an easy /practical  way to convert holidays dates to number of
weeks?

daniel

2010/2/10 John Rakestraw <lists@johnrakestraw.com>

> >>>>> Daniel Martins writes:
>
> > Someone could send me an example of the use of the org-diary-class ??
>
> *** 12:15-13:05 Class
>    <%%(org-diary-class 1 13 2010 5 3 2010 1 3 7 10 14)>
>    <%%(org-diary-class 1 13 2010 5 3 2010 3 10)>
>    <%%(org-diary-class 1 13 2010 5 3 2010 5 10 13)>
>
> Class meets Mon-Wed-Fri from Jan 13 to May 3 from 12:15 to 13:05, with
> holidays as indicated. Friday's class, for example, doesn't meet in weeks
> 10 and 13.
>
> --
> John Rakestraw
>

[-- Attachment #1.2: Type: text/html, Size: 1108 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Re: Organizing a students live
  2010-02-10 19:23                         ` Daniel Martins
@ 2010-02-10 19:45                           ` Stephan Schmitt
  2010-02-10 21:57                             ` Daniel Martins
  2010-02-10 22:20                           ` Nick Dokos
  1 sibling, 1 reply; 24+ messages in thread
From: Stephan Schmitt @ 2010-02-10 19:45 UTC (permalink / raw)
  To: Daniel Martins; +Cc: emacs-orgmode@gnu.org

Hi Daniel,

Also sprach Daniel Martins:
> BTW Is there an easy /practical  way to convert holidays dates to number
> of weeks?

the only way I'm aware of:
M-x calendar
navigate to the holiday date (type ? for the info node)
type p c (print the ISO date in the message area)

or take a look in your filofax...

Hth,
	Stephan

> 
>      > Someone could send me an example of the use of the org-diary-class ??
> 
>     *** 12:15-13:05 Class
>        <%%(org-diary-class 1 13 2010 5 3 2010 1 3 7 10 14)>
>        <%%(org-diary-class 1 13 2010 5 3 2010 3 10)>
>        <%%(org-diary-class 1 13 2010 5 3 2010 5 10 13)>
> 
>     Class meets Mon-Wed-Fri from Jan 13 to May 3 from 12:15 to 13:05, with
>     holidays as indicated. Friday's class, for example, doesn't meet in
>     weeks
>     10 and 13.
> 
>     --
>     John Rakestraw
> 
> 

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Re: Organizing a students live
  2010-02-10 19:45                           ` Stephan Schmitt
@ 2010-02-10 21:57                             ` Daniel Martins
  0 siblings, 0 replies; 24+ messages in thread
From: Daniel Martins @ 2010-02-10 21:57 UTC (permalink / raw)
  To: Stephan Schmitt; +Cc: emacs-orgmode@gnu.org


[-- Attachment #1.1: Type: text/plain, Size: 1014 bytes --]

Thanks Stephan,

I still miss a lot the OMIT function of remind/wyrd ...

Daniel

2010/2/10 Stephan Schmitt <drmabuse@cs.tu-berlin.de>

> Hi Daniel,
>
> Also sprach Daniel Martins:
>
>  BTW Is there an easy /practical  way to convert holidays dates to number
>> of weeks?
>>
>
> the only way I'm aware of:
> M-x calendar
> navigate to the holiday date (type ? for the info node)
> type p c (print the ISO date in the message area)
>
> or take a look in your filofax...
>
> Hth,
>        Stephan
>
>
>
>>     > Someone could send me an example of the use of the org-diary-class
>> ??
>>
>>    *** 12:15-13:05 Class
>>       <%%(org-diary-class 1 13 2010 5 3 2010 1 3 7 10 14)>
>>       <%%(org-diary-class 1 13 2010 5 3 2010 3 10)>
>>       <%%(org-diary-class 1 13 2010 5 3 2010 5 10 13)>
>>
>>    Class meets Mon-Wed-Fri from Jan 13 to May 3 from 12:15 to 13:05, with
>>    holidays as indicated. Friday's class, for example, doesn't meet in
>>    weeks
>>    10 and 13.
>>
>>    --
>>    John Rakestraw
>>
>>
>>

[-- Attachment #1.2: Type: text/html, Size: 1801 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Re: Organizing a students live
  2010-02-10 19:23                         ` Daniel Martins
  2010-02-10 19:45                           ` Stephan Schmitt
@ 2010-02-10 22:20                           ` Nick Dokos
  2010-02-10 22:31                             ` Carsten Dominik
  1 sibling, 1 reply; 24+ messages in thread
From: Nick Dokos @ 2010-02-10 22:20 UTC (permalink / raw)
  To: Daniel Martins; +Cc: emacs-orgmode@gnu.org

Daniel Martins <danielemc@gmail.com> wrote:

> 2010/2/10 John Rakestraw <lists@johnrakestraw.com>
> 
>     >>>>> Daniel Martins writes:
>    
>     > Someone could send me an example of the use of the org-diary-class ??
>    
>     *** 12:15-13:05 Class
>        <%%(org-diary-class 1 13 2010 5 3 2010 1 3 7 10 14)>
>        <%%(org-diary-class 1 13 2010 5 3 2010 3 10)>
>        <%%(org-diary-class 1 13 2010 5 3 2010 5 10 13)>
>    
>     Class meets Mon-Wed-Fri from Jan 13 to May 3 from 12:15 to 13:05, with
>     holidays as indicated. Friday's class, for example, doesn't meet in weeks
>     10 and 13.
>    
> Thank you very much John. Incredibly fast answer !!!
> 
> BTW Is there an easy /practical  way to convert holidays dates to number of weeks?

Not sure I read this right, but if you are talking about converting a
date to a week-number (as e.g. exhibited at the top of the weekly
agenda), this should do the trick:

;;; date is a three-element list (month day year)
;;; (calendar-current-date) returns the date in this format.
(defun week-number (date)
       (org-days-to-iso-week
                    (calendar-absolute-from-gregorian date)))

but I guess the more difficult question is a user interface that allows
you to construct such elaborate org-diary-class constructs.

Nick

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Re: Organizing a students live
  2010-02-10 22:20                           ` Nick Dokos
@ 2010-02-10 22:31                             ` Carsten Dominik
  2010-02-10 22:48                               ` Daniel Martins
  0 siblings, 1 reply; 24+ messages in thread
From: Carsten Dominik @ 2010-02-10 22:31 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode@gnu.org


On Feb 10, 2010, at 11:20 PM, Nick Dokos wrote:

> Daniel Martins <danielemc@gmail.com> wrote:
>
>> 2010/2/10 John Rakestraw <lists@johnrakestraw.com>
>>
>>>>>>> Daniel Martins writes:
>>
>>> Someone could send me an example of the use of the org-diary- 
>>> class ??
>>
>>    *** 12:15-13:05 Class
>>       <%%(org-diary-class 1 13 2010 5 3 2010 1 3 7 10 14)>
>>       <%%(org-diary-class 1 13 2010 5 3 2010 3 10)>
>>       <%%(org-diary-class 1 13 2010 5 3 2010 5 10 13)>
>>
>>    Class meets Mon-Wed-Fri from Jan 13 to May 3 from 12:15 to  
>> 13:05, with
>>    holidays as indicated. Friday's class, for example, doesn't meet  
>> in weeks
>>    10 and 13.
>>
>> Thank you very much John. Incredibly fast answer !!!
>>
>> BTW Is there an easy /practical  way to convert holidays dates to  
>> number of weeks?
>
> Not sure I read this right, but if you are talking about converting a
> date to a week-number (as e.g. exhibited at the top of the weekly
> agenda), this should do the trick:
>
> ;;; date is a three-element list (month day year)
> ;;; (calendar-current-date) returns the date in this format.
> (defun week-number (date)
>       (org-days-to-iso-week
>                    (calendar-absolute-from-gregorian date)))
>
> but I guess the more difficult question is a user interface that  
> allows
> you to construct such elaborate org-diary-class constructs.

You can also navigate the agenda to the corresponding days, and it  
will show the week number.

HTH

- Carsten

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Re: Organizing a students live
  2010-02-10 22:31                             ` Carsten Dominik
@ 2010-02-10 22:48                               ` Daniel Martins
  0 siblings, 0 replies; 24+ messages in thread
From: Daniel Martins @ 2010-02-10 22:48 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode@gnu.org


[-- Attachment #1.1: Type: text/plain, Size: 1849 bytes --]

It helps!

It is silly how I never noticed  the (W06) in top of agenda!

Anyway Nick comments

but I guess the more difficult question is a user interface that allows
> you to construct such elaborate org-diary-class constructs.
>

are quite pertinent.

Daniel

2010/2/10 Carsten Dominik <carsten.dominik@gmail.com>

>
> On Feb 10, 2010, at 11:20 PM, Nick Dokos wrote:
>
>  Daniel Martins <danielemc@gmail.com> wrote:
>>
>>  2010/2/10 John Rakestraw <lists@johnrakestraw.com>
>>>
>>>  Daniel Martins writes:
>>>>>>>>
>>>>>>>
>>>  Someone could send me an example of the use of the org-diary-class ??
>>>>
>>>
>>>   *** 12:15-13:05 Class
>>>      <%%(org-diary-class 1 13 2010 5 3 2010 1 3 7 10 14)>
>>>      <%%(org-diary-class 1 13 2010 5 3 2010 3 10)>
>>>      <%%(org-diary-class 1 13 2010 5 3 2010 5 10 13)>
>>>
>>>   Class meets Mon-Wed-Fri from Jan 13 to May 3 from 12:15 to 13:05, with
>>>   holidays as indicated. Friday's class, for example, doesn't meet in
>>> weeks
>>>   10 and 13.
>>>
>>> Thank you very much John. Incredibly fast answer !!!
>>>
>>> BTW Is there an easy /practical  way to convert holidays dates to number
>>> of weeks?
>>>
>>
>> Not sure I read this right, but if you are talking about converting a
>> date to a week-number (as e.g. exhibited at the top of the weekly
>> agenda), this should do the trick:
>>
>> ;;; date is a three-element list (month day year)
>> ;;; (calendar-current-date) returns the date in this format.
>> (defun week-number (date)
>>      (org-days-to-iso-week
>>                   (calendar-absolute-from-gregorian date)))
>>
>> but I guess the more difficult question is a user interface that allows
>> you to construct such elaborate org-diary-class constructs.
>>
>
> You can also navigate the agenda to the corresponding days, and it will
> show the week number.
>
> HTH
>
> - Carsten
>
>

[-- Attachment #1.2: Type: text/html, Size: 3742 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Organizing a students live
  2010-03-10 12:14 ` Daniel Martins
@ 2010-03-10 13:13   ` Matt Lundin
  2010-03-10 17:24     ` Daniel Martins
  0 siblings, 1 reply; 24+ messages in thread
From: Matt Lundin @ 2010-03-10 13:13 UTC (permalink / raw)
  To: Daniel Martins; +Cc: emacs-orgmode, Carsten Dominik

Daniel Martins <danielemc@gmail.com> writes:

> Today, for no apparent reason,  the org-diary-class below it does not work
>
> Is the re any reason or is it my fault? My version is 6.30c

According to the change log[1] org-diary-class was added in version 6.34.

Best,
Matt

Footnotes:

[1] http://orgmode.org/Changes.html#sec-1.2.3

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Organizing a students live
  2010-03-10 13:13   ` Matt Lundin
@ 2010-03-10 17:24     ` Daniel Martins
  0 siblings, 0 replies; 24+ messages in thread
From: Daniel Martins @ 2010-03-10 17:24 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode, Carsten Dominik

Trying to use cd-colors from Carsten lecture, somehow emacs get lost
with the directories and did not go to the updated org-mode file.
An involuntary downgrade!

My fault!

Sorry

Daniel

2010/3/10 Matt Lundin <mdl@imapmail.org>:
> Daniel Martins <danielemc@gmail.com> writes:
>
>> Today, for no apparent reason,  the org-diary-class below it does not work
>>
>> Is the re any reason or is it my fault? My version is 6.30c
>
> According to the change log[1] org-diary-class was added in version 6.34.
>
> Best,
> Matt
>
> Footnotes:
>
> [1] http://orgmode.org/Changes.html#sec-1.2.3
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2010-03-10 17:24 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-18 10:48 Organizing a students live Thomas Bach
2009-12-18 13:31 ` Giovanni Ridolfi
2009-12-18 14:41 ` Darlan Cavalcante Moreira
2009-12-19  9:16 ` Jan Böcker
2009-12-19 11:20   ` Thomas Bach
2009-12-20 22:54     ` Daniel Martins
2009-12-20 23:52       ` Matt Lundin
2009-12-21 15:54         ` Daniel Martins
2009-12-22 15:30           ` Matthew Lundin
2009-12-26 11:33           ` Carsten Dominik
2009-12-27  0:51             ` Daniel Martins
2009-12-28 18:47               ` Carsten Dominik
2009-12-28 21:09                 ` Daniel Martins
2010-01-03 13:17                   ` Carsten Dominik
2010-02-10 19:02                     ` Daniel Martins
     [not found]                       ` <m3pr4chpee.fsf@buster.johnrakestraw.com>
2010-02-10 19:23                         ` Daniel Martins
2010-02-10 19:45                           ` Stephan Schmitt
2010-02-10 21:57                             ` Daniel Martins
2010-02-10 22:20                           ` Nick Dokos
2010-02-10 22:31                             ` Carsten Dominik
2010-02-10 22:48                               ` Daniel Martins
2009-12-21 17:23     ` Jan Böcker
  -- strict thread matches above, loose matches on Subject: below --
2010-02-10 19:19 Fwd: Re: " John Rakestraw
2010-03-10 12:14 ` Daniel Martins
2010-03-10 13:13   ` Matt Lundin
2010-03-10 17:24     ` Daniel Martins

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).