emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-class and headers
@ 2014-10-21 12:04 Joseph Le Roux
  2014-10-21 12:57 ` Rasmus
  0 siblings, 1 reply; 8+ messages in thread
From: Joseph Le Roux @ 2014-10-21 12:04 UTC (permalink / raw)
  To: emacs-orgmode

Dear orgmode users,

First let me express my gratitude to the developers and maintainers for
such a wonderful piece of software!


I am a professor and I use org-class to schedule my lectures. It is very
useful to organize these repeated events and take into account holidays.
But inevitably in the academic world, some lectures get cancelled,
postponed, or moved to another day. In this case org-class does not
provide an efficient way to cancel and/or reschedule lectures. Another
issue I have is the inability to mark one class as DONE and still have
the remaining classes marked as TODO, and more generally to organize
notes and sort them by class sessions. Has any orgmode user ever solved
this problem ?


I've been thinking about this and I've come up with a possible solution.
Could org-class be modified in order to generate a list of headers, one
for each session of the class? These headers could then be independently
rescheduled at will. And of course each header could have its own
content. Any thought on how to implement this?

Cheers,

-- 
Joseph Le Roux

RCLN, LIPN, Université Paris 13
Tel: +33 (0) 1 49 40 40 81
Fax: +33 (0) 1 48 26 51 12
URL: http://lipn.univ-paris13.fr/~leroux

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

* Re: org-class and headers
  2014-10-21 12:04 org-class and headers Joseph Le Roux
@ 2014-10-21 12:57 ` Rasmus
  2014-10-21 14:47   ` Joseph Le Roux
  0 siblings, 1 reply; 8+ messages in thread
From: Rasmus @ 2014-10-21 12:57 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Joseph Le Roux <joseph.le.roux@gmail.com> writes:

> I am a professor and I use org-class to schedule my lectures. It is very
> useful to organize these repeated events and take into account holidays.
> But inevitably in the academic world, some lectures get cancelled,
> postponed, or moved to another day. In this case org-class does not
> provide an efficient way to cancel and/or reschedule lectures. Another
> issue I have is the inability to mark one class as DONE and still have
> the remaining classes marked as TODO, and more generally to organize
> notes and sort them by class sessions. Has any orgmode user ever solved
> this problem ?

If a class is canceled you can drop that week from the line and puts a
time stamp for the new one below.  In the following week 12 is dropped
and a replacement class is scheduled on 2014-03-18.

* class
<2014-03-18 Tue 11:00-13:00>
%%(org-class 2014 02 24 2014 03 25 1 12) class 11:00-13:00

> I've been thinking about this and I've come up with a possible solution.
> Could org-class be modified in order to generate a list of headers, one
> for each session of the class? These headers could then be independently
> rescheduled at will. And of course each header could have its own
> content. Any thought on how to implement this?

Will `org-clone-subtree-with-time-shift' do what you want?

Hope it helps,
Rasmus

-- 
Don't panic!!!

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

* Re: org-class and headers
  2014-10-21 12:57 ` Rasmus
@ 2014-10-21 14:47   ` Joseph Le Roux
  2014-10-21 20:15     ` Rasmus
  2014-10-22 14:30     ` Eric S Fraga
  0 siblings, 2 replies; 8+ messages in thread
From: Joseph Le Roux @ 2014-10-21 14:47 UTC (permalink / raw)
  To: emacs-orgmode

Rasmus <rasmus@gmx.us> writes:

> Hi,
>
> Joseph Le Roux <joseph.le.roux@gmail.com> writes:
>
>> I am a professor and I use org-class to schedule my lectures. It is very
>> useful to organize these repeated events and take into account holidays.
>> But inevitably in the academic world, some lectures get cancelled,
>> postponed, or moved to another day. In this case org-class does not
>> provide an efficient way to cancel and/or reschedule lectures. Another
>> issue I have is the inability to mark one class as DONE and still have
>> the remaining classes marked as TODO, and more generally to organize
>> notes and sort them by class sessions. Has any orgmode user ever solved
>> this problem ?
>
> If a class is canceled you can drop that week from the line and puts a
> time stamp for the new one below.  In the following week 12 is dropped
> and a replacement class is scheduled on 2014-03-18.
>
> * class
> <2014-03-18 Tue 11:00-13:00>
> %%(org-class 2014 02 24 2014 03 25 1 12) class 11:00-13:00

Yes of course, another timestamp! Great, now I can reschedule a postponed/cancelled lecture.


>
>> I've been thinking about this and I've come up with a possible solution.
>> Could org-class be modified in order to generate a list of headers, one
>> for each session of the class? These headers could then be independently
>> rescheduled at will. And of course each header could have its own
>> content. Any thought on how to implement this?
>
> Will `org-clone-subtree-with-time-shift' do what you want?
>

Thanks for the pointer, it could be very handy in my use-case, but this
function copies the org-class as is for all clones. I would like to
generate a list of headers, one for each session (with the actual date
of the session). Maybe I will try to see how org-class computes all the
dates, then I can clone the header with the appropriate time-shift/new
date.


> Hope it helps,
> Rasmus

Thank you for your help,
Joseph


-- 
Joseph Le Roux

RCLN, LIPN, Université Paris 13
Tel: +33 (0) 1 49 40 40 81
Fax: +33 (0) 1 48 26 51 12
URL: http://lipn.univ-paris13.fr/~leroux

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

* Re: org-class and headers
  2014-10-21 14:47   ` Joseph Le Roux
@ 2014-10-21 20:15     ` Rasmus
  2014-10-22 14:30     ` Eric S Fraga
  1 sibling, 0 replies; 8+ messages in thread
From: Rasmus @ 2014-10-21 20:15 UTC (permalink / raw)
  To: emacs-orgmode

Joseph Le Roux <joseph.le.roux@gmail.com> writes:

> Rasmus <rasmus@gmx.us> writes:
>
>> Hi,
>>
>> Joseph Le Roux <joseph.le.roux@gmail.com> writes:
>>
>>> I am a professor and I use org-class to schedule my lectures. It is very
>>> useful to organize these repeated events and take into account holidays.
>>> But inevitably in the academic world, some lectures get cancelled,
>>> postponed, or moved to another day. In this case org-class does not
>>> provide an efficient way to cancel and/or reschedule lectures. Another
>>> issue I have is the inability to mark one class as DONE and still have
>>> the remaining classes marked as TODO, and more generally to organize
>>> notes and sort them by class sessions. Has any orgmode user ever solved
>>> this problem ?
>>
>> If a class is canceled you can drop that week from the line and puts a
>> time stamp for the new one below.  In the following week 12 is dropped
>> and a replacement class is scheduled on 2014-03-18.
>>
>> * class
>> <2014-03-18 Tue 11:00-13:00>
>> %%(org-class 2014 02 24 2014 03 25 1 12) class 11:00-13:00
>
> Yes of course, another timestamp! Great, now I can reschedule a postponed/cancelled lecture.
>
>
>>
>>> I've been thinking about this and I've come up with a possible solution.
>>> Could org-class be modified in order to generate a list of headers, one
>>> for each session of the class? These headers could then be independently
>>> rescheduled at will. And of course each header could have its own
>>> content. Any thought on how to implement this?
>>
>> Will `org-clone-subtree-with-time-shift' do what you want?
>>
>
> Thanks for the pointer, it could be very handy in my use-case, but this
> function copies the org-class as is for all clones. I would like to
> generate a list of headers, one for each session (with the actual date
> of the session). Maybe I will try to see how org-class computes all the
> dates, then I can clone the header with the appropriate time-shift/new
> date.

Maybe I'm misunderstanding you, but I think
`org-clone-subtree-with-time-shift' already does this.  Or do you need
to change the name of the headline?

Here's an example:

(with-temp-buffer
  (insert "* class
<2014-10-22 mié 13:00-15:00>")
  (goto-char (point-min))
  (org-clone-subtree-with-time-shift 5 "+1w")
  ;; ignore this
  (let ((str (buffer-string)))
     (set-text-properties 0 (length str) nil str) str))
=> 
"* class
<2014-10-22 mié 13:00-15:00>
* class
<2014-10-29 mié 13:00-15:00>
* class
<2014-11-05 mié 13:00-15:00>
* class
<2014-11-12 mié 13:00-15:00>
* class
<2014-11-19 mié 13:00-15:00>
* class
<2014-11-26 mié 13:00-15:00>
"

g
-- 
I feel emotional landscapes they puzzle me

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

* Re: org-class and headers
  2014-10-21 14:47   ` Joseph Le Roux
  2014-10-21 20:15     ` Rasmus
@ 2014-10-22 14:30     ` Eric S Fraga
  2014-10-22 20:34       ` Joseph Le Roux
  1 sibling, 1 reply; 8+ messages in thread
From: Eric S Fraga @ 2014-10-22 14:30 UTC (permalink / raw)
  To: Joseph Le Roux; +Cc: emacs-orgmode

On Tuesday, 21 Oct 2014 at 16:47, Joseph Le Roux wrote:
> Rasmus <rasmus@gmx.us> writes:

[...]

>> Will `org-clone-subtree-with-time-shift' do what you want?
>>
>
> Thanks for the pointer, it could be very handy in my use-case, but this
> function copies the org-class as is for all clones. I would like to

The idea is to use the clone function and not the org-class
expression.  Combining the two simply confuses things!

What I do every start of term is define an entry for each lecture slot
in a week including the actual time information, lecture theatre,
etc.  I then clone each individual entry using +1w for the number of
weeks in the term.  I remove any subtrees generated that correspond to
lectures that do not actually exist, e.g. they fall on a holiday or
during our study week.

Later, if an individual lecture gets cancelled, I simply remove the
corresponding subtree as I do for holidays etc.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-475-g25d50e

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

* Re: org-class and headers
  2014-10-22 14:30     ` Eric S Fraga
@ 2014-10-22 20:34       ` Joseph Le Roux
  2014-10-23 10:10         ` Rasmus
  0 siblings, 1 reply; 8+ messages in thread
From: Joseph Le Roux @ 2014-10-22 20:34 UTC (permalink / raw)
  To: emacs-orgmode

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> On Tuesday, 21 Oct 2014 at 16:47, Joseph Le Roux wrote:
>> Rasmus <rasmus@gmx.us> writes:
>
> [...]
>
>>> Will `org-clone-subtree-with-time-shift' do what you want?
>>>
>>
>> Thanks for the pointer, it could be very handy in my use-case, but this
>> function copies the org-class as is for all clones. I would like to
>
> The idea is to use the clone function and not the org-class
> expression.  Combining the two simply confuses things!
>
> What I do every start of term is define an entry for each lecture slot
> in a week including the actual time information, lecture theatre,
> etc.  I then clone each individual entry using +1w for the number of
> weeks in the term.  I remove any subtrees generated that correspond to
> lectures that do not actually exist, e.g. they fall on a holiday or
> during our study week.
>
> Later, if an individual lecture gets cancelled, I simply remove the
> corresponding subtree as I do for holidays etc.

Thank you Eric, I'll follow the advice. As Rasmus showed,
'org-clone-subtree-with-time-shift' works with a timestamp, but it does
not with (the result of) an org-class call. Ideally, what I would like
to do is to specify a set of classes using org-class syntax and, as a
result, get a set of headers. 'org-class' is a powerful tool, but just
not powerful enough yet...


--
Joseph Le Roux

RCLN, LIPN, Université Paris 13
Tel: +33 (0) 1 49 40 40 81
Fax: +33 (0) 1 48 26 51 12
URL: http://lipn.univ-paris13.fr/~leroux

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

* Re: org-class and headers
  2014-10-22 20:34       ` Joseph Le Roux
@ 2014-10-23 10:10         ` Rasmus
  2014-10-23 18:20           ` Joseph Le Roux
  0 siblings, 1 reply; 8+ messages in thread
From: Rasmus @ 2014-10-23 10:10 UTC (permalink / raw)
  To: emacs-orgmode

Joseph Le Roux <joseph.le.roux@gmail.com> writes:

> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
>
>> On Tuesday, 21 Oct 2014 at 16:47, Joseph Le Roux wrote:
>>> Rasmus <rasmus@gmx.us> writes:
>>
>> [...]
>>
>>>> Will `org-clone-subtree-with-time-shift' do what you want?
>>>>
>>>
>>> Thanks for the pointer, it could be very handy in my use-case, but this
>>> function copies the org-class as is for all clones. I would like to
>>
>> The idea is to use the clone function and not the org-class
>> expression.  Combining the two simply confuses things!
>>
>> What I do every start of term is define an entry for each lecture slot
>> in a week including the actual time information, lecture theatre,
>> etc.  I then clone each individual entry using +1w for the number of
>> weeks in the term.  I remove any subtrees generated that correspond to
>> lectures that do not actually exist, e.g. they fall on a holiday or
>> during our study week.
>>
>> Later, if an individual lecture gets cancelled, I simply remove the
>> corresponding subtree as I do for holidays etc.
>
> Thank you Eric, I'll follow the advice. As Rasmus showed,
> 'org-clone-subtree-with-time-shift' works with a timestamp, but it does
> not with (the result of) an org-class call. Ideally, what I would like
> to do is to specify a set of classes using org-class syntax and, as a
> result, get a set of headers. 'org-class' is a powerful tool, but just
> not powerful enough yet...

I have used to use classes in the past, but I now use a setup close to
Eric's.  One reasons is for good org-caldav support.  Here's how I
schedule my Spanish classes this term:

(with-temp-buffer
  (insert "* Spanish course
** Spanish class
<2014-10-07 Tue 18:30-20:30>")
  (goto-line 2)
  (org-clone-subtree-with-time-shift 8 "+1w")
  (save-excursion (insert "** Spanish class
<2014-10-09 Thu 18:30-20:30>\n"))
  (org-clone-subtree-with-time-shift 7 "+1w")
  (goto-char (point-min)) (org-sort-entries nil ?t)
  ;; like C-c ^ t
(buffer-substring-no-properties (point-min) (point-max)))

Of course in practice, this is easier to "interactively", but it's
hard to describe briefly.

Is there anything you miss about `org-clone-subtree-with-time-shift'¹?
Would you be happy if it asked if you want to skip some weeks
initially?  Or do you not like the extra space it takes?

—Rasmus

Footnotes: 
¹   note the "`" in the beginning, not "'"

-- 
Bang bang

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

* Re: org-class and headers
  2014-10-23 10:10         ` Rasmus
@ 2014-10-23 18:20           ` Joseph Le Roux
  0 siblings, 0 replies; 8+ messages in thread
From: Joseph Le Roux @ 2014-10-23 18:20 UTC (permalink / raw)
  To: emacs-orgmode

Rasmus <rasmus@gmx.us> writes:

> Joseph Le Roux <joseph.le.roux@gmail.com> writes:
>
>> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
>>
>>> On Tuesday, 21 Oct 2014 at 16:47, Joseph Le Roux wrote:
>>>> Rasmus <rasmus@gmx.us> writes:
>>>
>>> [...]
>>>
>>>>> Will `org-clone-subtree-with-time-shift' do what you want?
>>>>>
>>>>
>>>> Thanks for the pointer, it could be very handy in my use-case, but this
>>>> function copies the org-class as is for all clones. I would like to
>>>
>>> The idea is to use the clone function and not the org-class
>>> expression.  Combining the two simply confuses things!
>>>
>>> What I do every start of term is define an entry for each lecture slot
>>> in a week including the actual time information, lecture theatre,
>>> etc.  I then clone each individual entry using +1w for the number of
>>> weeks in the term.  I remove any subtrees generated that correspond to
>>> lectures that do not actually exist, e.g. they fall on a holiday or
>>> during our study week.
>>>
>>> Later, if an individual lecture gets cancelled, I simply remove the
>>> corresponding subtree as I do for holidays etc.
>>
>> Thank you Eric, I'll follow the advice. As Rasmus showed,
>> 'org-clone-subtree-with-time-shift' works with a timestamp, but it does
>> not with (the result of) an org-class call. Ideally, what I would like
>> to do is to specify a set of classes using org-class syntax and, as a
>> result, get a set of headers. 'org-class' is a powerful tool, but just
>> not powerful enough yet...
>
> I have used to use classes in the past, but I now use a setup close to
> Eric's.  One reasons is for good org-caldav support.  Here's how I
> schedule my Spanish classes this term:
>

Yes you're right. org-class is not practical for caldav export. That's
yet another issue I could have raised.

> (with-temp-buffer
>   (insert "* Spanish course
> ** Spanish class
> <2014-10-07 Tue 18:30-20:30>")
>   (goto-line 2)
>   (org-clone-subtree-with-time-shift 8 "+1w")
>   (save-excursion (insert "** Spanish class
> <2014-10-09 Thu 18:30-20:30>\n"))
>   (org-clone-subtree-with-time-shift 7 "+1w")
>   (goto-char (point-min)) (org-sort-entries nil ?t)
>   ;; like C-c ^ t
> (buffer-substring-no-properties (point-min) (point-max)))
>
> Of course in practice, this is easier to "interactively", but it's
> hard to describe briefly.

I see.

>
> Is there anything you miss about `org-clone-subtree-with-time-shift'¹?
> Would you be happy if it asked if you want to skip some weeks
> initially?  Or do you not like the extra space it takes?
>

Yes I would like to be able to directly specify the skipped weeks. I've
tried to hack a function for that but my elisp skills are rather
limited.

Joseph

> —Rasmus
>
> Footnotes: 
> ¹   note the "`" in the beginning, not "'"

noted


-- 
Joseph Le Roux

RCLN, LIPN, Université Paris 13
Tel: +33 (0) 1 49 40 40 81
Fax: +33 (0) 1 48 26 51 12
URL: http://lipn.univ-paris13.fr/~leroux

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

end of thread, other threads:[~2014-10-23 18:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-21 12:04 org-class and headers Joseph Le Roux
2014-10-21 12:57 ` Rasmus
2014-10-21 14:47   ` Joseph Le Roux
2014-10-21 20:15     ` Rasmus
2014-10-22 14:30     ` Eric S Fraga
2014-10-22 20:34       ` Joseph Le Roux
2014-10-23 10:10         ` Rasmus
2014-10-23 18:20           ` Joseph Le Roux

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