emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: org-class and headers
Date: Tue, 21 Oct 2014 22:15:49 +0200	[thread overview]
Message-ID: <87bnp589hm.fsf@gmx.us> (raw)
In-Reply-To: m21tq17a57.fsf@lapis.home

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

  reply	other threads:[~2014-10-21 20:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bnp589hm.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).