From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: org-class and headers Date: Tue, 21 Oct 2014 22:15:49 +0200 Message-ID: <87bnp589hm.fsf@gmx.us> References: <87wq7tbmwi.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xgfqn-0004ac-Cz for emacs-orgmode@gnu.org; Tue, 21 Oct 2014 16:16:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xgfqh-0002tV-4O for emacs-orgmode@gnu.org; Tue, 21 Oct 2014 16:16:13 -0400 Received: from plane.gmane.org ([80.91.229.3]:56483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xgfqg-0002tP-US for emacs-orgmode@gnu.org; Tue, 21 Oct 2014 16:16:07 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Xgfqg-00078p-2S for emacs-orgmode@gnu.org; Tue, 21 Oct 2014 22:16:06 +0200 Received: from 217.130.110.20 ([217.130.110.20]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Oct 2014 22:16:06 +0200 Received: from rasmus by 217.130.110.20 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Oct 2014 22:16:06 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Joseph Le Roux writes: > Rasmus writes: > >> Hi, >> >> Joseph Le Roux 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