From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Repeat only a certain number of times Date: Thu, 27 Aug 2015 17:17:43 +0100 Message-ID: <87bndsln88.fsf@ucl.ac.uk> References: <87wpwgzpna.fsf@turing.flintfam.org> 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]:47214) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUzsB-00067g-Eh for emacs-orgmode@gnu.org; Thu, 27 Aug 2015 12:17:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUzs8-0004Di-7Z for emacs-orgmode@gnu.org; Thu, 27 Aug 2015 12:17:55 -0400 Received: from mail-am1on0106.outbound.protection.outlook.com ([157.56.112.106]:26688 helo=emea01-am1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUzs7-0004B4-S8 for emacs-orgmode@gnu.org; Thu, 27 Aug 2015 12:17:52 -0400 In-Reply-To: <87wpwgzpna.fsf@turing.flintfam.org> (Samuel W. Flint's message of "Thu, 27 Aug 2015 12:01:45 -0400") 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: "Samuel W. Flint" Cc: Org-Mode On Thursday, 27 Aug 2015 at 12:01, Samuel W. Flint wrote: > I was wondering, is there a way to set a date-stamp so that it only > repeats a certain number of times? If not, what would it take to add > it? http://orgmode.org/worg/org-faq.html#org-class However, my usual approach (for timetabling lectures, say) is to use: ,----[ C-h f org-clone-subtree-with-time-shift RET ] | org-clone-subtree-with-time-shift is an interactive compiled Lisp | function in =E2=80=98org.el=E2=80=99. |=20 | (org-clone-subtree-with-time-shift N &optional SHIFT) |=20 | Clone the task (subtree) at point N times. | The clones will be inserted as siblings. |=20 | In interactive use, the user will be prompted for the number of | clones to be produced. If the entry has a timestamp, the user | will also be prompted for a time shift, which may be a repeater | as used in time stamps, for example =E2=80=98+3d=E2=80=99. To disable th= is, | you can call the function with a universal prefix argument. |=20 | When a valid repeater is given and the entry contains any time | stamps, the clones will become a sequence in time, with time | stamps in the subtree shifted for each clone produced. If SHIFT | is nil or the empty string, time stamps will be left alone. The | ID property of the original subtree is removed. |=20 | If the original subtree did contain time stamps with a repeater, | the following will happen: | - the repeater will be removed in each clone | - an additional clone will be produced, with the current, unshifted | date(s) in the entry. | - the original entry will be placed *after* all the clones, with | repeater intact. | - the start days in the repeater in the original entry will be shifted | to past the last clone. | In this way you can spell out a number of instances of a repeating task, | and still retain the repeater to cover future instances of the task. |=20 | As described above, N+1 clones are produced when the original | subtree has a repeater. Setting N to 0, then, can be used to | remove the repeater from a subtree and create a shifted clone | with the original repeater. |=20 | [back] `---- --=20 : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-176-g45abec