emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Is it possible to repeat tasks only a certain amount of times?
@ 2017-09-13 11:01 Göktuğ Kayaalp
  2017-09-13 19:23 ` Eric S Fraga
  2017-09-13 23:58 ` Jorge Morais Neto
  0 siblings, 2 replies; 5+ messages in thread
From: Göktuğ Kayaalp @ 2017-09-13 11:01 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]

Hi,

I have a task with the following timestamp:

<2017-09-18 Pzt 14:25-18:40 +1w>

which represents an event that's going to repeat every week during a
certain period (it's not a TODO item).  With this timestamp however in
my agenda it repeats forever until when I'll finally archive it.
Ideally I'd have sth like the following:

<2017-09-18 Pzt 14:25-18:40 +1w #9>

where the final ‘#9’ means that the event will only repeat _8 times_
(i.e. 9 times with the initial instance).  Is this somehow already
possible, or else would it be plausible to implement this mainstream (I
could try to generate a patch in the coming weeks for this, tho it would
take a while as I'm not very familiar with org's innards and I wont have
lots of free time)?

I have tried the following:

<2017-09-18 Pzt 14:25-18:40 +1w>--<another date>

but then the entry appears (unsurprisingly) on my agenda every day,
instead of only on Monday, which I dont want at all (these are lessons
that repeat every certain day of each week of a certain period, and they
are many).

Thanks in advance,

       Göktuğ.

-- 
İ. Göktuğ Kayaalp               http://www.gkayaalp.com/index.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

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

* Re: Is it possible to repeat tasks only a certain amount of times?
  2017-09-13 11:01 Is it possible to repeat tasks only a certain amount of times? Göktuğ Kayaalp
@ 2017-09-13 19:23 ` Eric S Fraga
  2017-09-13 23:58 ` Jorge Morais Neto
  1 sibling, 0 replies; 5+ messages in thread
From: Eric S Fraga @ 2017-09-13 19:23 UTC (permalink / raw)
  To: Göktuğ Kayaalp; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2236 bytes --]

On Wednesday, 13 Sep 2017 at 14:01, Göktuğ Kayaalp wrote:
> I have tried the following:
>
> <2017-09-18 Pzt 14:25-18:40 +1w>--<another date>

I think this is discussed in the FAQ on the org mode web site but, in
any case, no, you cannot do what you want.  You may wish to look at 
,----
| org-clone-subtree-with-time-shift is an interactive compiled Lisp
| function in ‘org.el’.
| 
| (org-clone-subtree-with-time-shift N &optional SHIFT)
| 
| Clone the task (subtree) at point N times.
| The clones will be inserted as siblings.
| 
| 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 ‘+3d’.  To disable this,
| you can call the function with a universal prefix argument.
| 
| 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.
| 
| In each clone, all the CLOCK entries will be removed.  This
| prevents Org from considering that the clocked times overlap.
| 
| 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.
| 
| 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.
`----

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-573-g09e612

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: Is it possible to repeat tasks only a certain amount of times?
  2017-09-13 11:01 Is it possible to repeat tasks only a certain amount of times? Göktuğ Kayaalp
  2017-09-13 19:23 ` Eric S Fraga
@ 2017-09-13 23:58 ` Jorge Morais Neto
  2017-09-14  8:05   ` Göktuğ Kayaalp
  1 sibling, 1 reply; 5+ messages in thread
From: Jorge Morais Neto @ 2017-09-13 23:58 UTC (permalink / raw)
  To: Göktuğ Kayaalp; +Cc: org mode

How about a diary-style sexp entry, with org-class?  That is, something
like ~<%%(org-class 2017 7 31 2018 3 23 1)>~.  That example would appear
on the agenda on every Monday between 2017-07-31 and 2018-03-23.

Regards

-- 
- I am Brazilian.  I hope my English is correct and I welcome feedback
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z
- Free (as in free speech) software for Android: https://f-droid.org/

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

* Re: Is it possible to repeat tasks only a certain amount of times?
  2017-09-13 23:58 ` Jorge Morais Neto
@ 2017-09-14  8:05   ` Göktuğ Kayaalp
  2017-09-14  8:27     ` Eric S Fraga
  0 siblings, 1 reply; 5+ messages in thread
From: Göktuğ Kayaalp @ 2017-09-14  8:05 UTC (permalink / raw)
  To: emacs-orgmode

On 2017-09-13 20:58 +03, Jorge Morais Neto <jorge13515@gmail.com> wrote:
> How about a diary-style sexp entry, with org-class?  That is, something
> like ~<%%(org-class 2017 7 31 2018 3 23 1)>~.  That example would appear
> on the agenda on every Monday between 2017-07-31 and 2018-03-23.

Thanks a lot, this in combination with the hours of the event in the
title (I didn't know that this worked) works nicely in Org Agenda, but
unfortunately such entries do not get exported to ICS, which is
important for me.  It seems to me that my only option ATM is what Eric S
Fraga pointed, but that's rather tedious as things like lessons change
during the year (different classrooms, time changes).

Cheers,
-g.

> Regards

-- 
İ. Göktuğ Kayaalp              http://www.gkayaalp.com/index.html
self@gkayaalp.com    🎀            PGP = 024C 30DD 597D 142B 49AC
Plaintext please!  {UTF8}  Fingerprint   40EB 465C D949 B101 2427

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

* Re: Is it possible to repeat tasks only a certain amount of times?
  2017-09-14  8:05   ` Göktuğ Kayaalp
@ 2017-09-14  8:27     ` Eric S Fraga
  0 siblings, 0 replies; 5+ messages in thread
From: Eric S Fraga @ 2017-09-14  8:27 UTC (permalink / raw)
  To: Göktuğ Kayaalp; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 676 bytes --]

On Thursday, 14 Sep 2017 at 11:05, Göktuğ Kayaalp wrote:
> It seems to me that my only option ATM is what Eric S Fraga pointed,
> but that's rather tedious as things like lessons change during the
> year (different classrooms, time changes).

Funnily enough, it is for changes in lecture halls etc. that I use the
clone subtree approach: that way each entry can have different
information.  I specify the defaults in the first entry; clone the
number I want and then modify any special cases as required
(e.g. different lecture hall, delete the reading week slot, ...).

But, of course, YMMV!

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.1-57-gc6e563

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

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

end of thread, other threads:[~2017-09-14  8:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-13 11:01 Is it possible to repeat tasks only a certain amount of times? Göktuğ Kayaalp
2017-09-13 19:23 ` Eric S Fraga
2017-09-13 23:58 ` Jorge Morais Neto
2017-09-14  8:05   ` Göktuğ Kayaalp
2017-09-14  8:27     ` Eric S Fraga

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