From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Le Roux Subject: Re: org-class and headers Date: Thu, 23 Oct 2014 20:20:38 +0200 Message-ID: References: <87wq7tbmwi.fsf@gmx.us> <871tq0npm7.fsf@ucl.ac.uk> <87y4s79jwe.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhN0E-0002Wu-OJ for emacs-orgmode@gnu.org; Thu, 23 Oct 2014 14:20:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhN0A-0003Yk-5M for emacs-orgmode@gnu.org; Thu, 23 Oct 2014 14:20:50 -0400 Received: from mail-wi0-x22e.google.com ([2a00:1450:400c:c05::22e]:41353) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhN09-0003Ye-RP for emacs-orgmode@gnu.org; Thu, 23 Oct 2014 14:20:45 -0400 Received: by mail-wi0-f174.google.com with SMTP id q5so1501573wiv.7 for ; Thu, 23 Oct 2014 11:20:44 -0700 (PDT) Received: from lapis.home ([92.141.127.51]) by mx.google.com with ESMTPSA id lp8sm6252139wic.17.2014.10.23.11.20.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Oct 2014 11:20:42 -0700 (PDT) In-Reply-To: <87y4s79jwe.fsf@gmx.us> (rasmus@gmx.us's message of "Thu, 23 Oct 2014 12:10:09 +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 Rasmus writes: > Joseph Le Roux writes: > >> Eric S Fraga writes: >> >>> On Tuesday, 21 Oct 2014 at 16:47, Joseph Le Roux wrote: >>>> Rasmus 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'=EF= =BB=BF=C2=B9? > 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 > =E2=80=94Rasmus > > Footnotes:=20 > =EF=BB=BF=C2=B9 note the "`" in the beginning, not "'" noted --=20 Joseph Le Roux RCLN, LIPN, Universit=C3=A9 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