all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* What's the proper way to define a recurring event
@ 2024-12-14 17:51 Renaud Bussières via General discussions about Org-mode.
  2024-12-14 18:15 ` Mark Barton
  2024-12-17 17:21 ` Michael Heerdegen
  0 siblings, 2 replies; 3+ messages in thread
From: Renaud Bussières via General discussions about Org-mode. @ 2024-12-14 17:51 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I've look around, and I haven't found a way to achieve the result I would like regarding recurring events (and not tasks)

Let's say I want to insert my yoga class in my Agenda. This class starts on date X, it is planned to repeat every week, for 8 weeks. In my "agenda.org" file I would write:

* Events
** Yoga Class
<2024-10-07 Mon 16:00-17:30 +1w>

That would display the class every week, but forever, that isn't ideal. If I change the timestamp to:

<2024-10-07 Mon 16:00-17:30 +1w>--<2024-11-25 Mon>

Then the event will appear in the agenda every day between 2024-10-07 and 2024-11-25, that's not right. It seems like time/date ranges do not respect repeaters.

I know one way to do this would be to enter multiple timestamps, or multiple headings with timestamps for every occurences of the event. That would be manageable for my yoga class example, but that wouldn't work for recurring events that are repeated for a large or unknown number of times.

Right now, what I can do is follow my first example, and when the recurring event is over, I archive it. This is fine, but still not ideal, because until I archive it, the event appears weekly forever. If I'm planning an event in the future, I would have to remember that this event that appears in my weekly schedule should not be there. And when I archive the event, it also disappears from the agenda history (if I look at previous weeks, the event isn't there anymore, because it is now archived).

So I guess this question is also a feature request:

It would be nice if Org-mode could take into account "repeater" while implementing time ranges. If no repeater is set, the event/task will appear every day during the range, like it currently does, but if there is a repeater that says, for example, +1w, then the event/task will appear only once a week, on the given day, in the given time range.

Thanks for your time and support,
Renaud B.







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

* Re: What's the proper way to define a recurring event
  2024-12-14 17:51 What's the proper way to define a recurring event Renaud Bussières via General discussions about Org-mode.
@ 2024-12-14 18:15 ` Mark Barton
  2024-12-17 17:21 ` Michael Heerdegen
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Barton @ 2024-12-14 18:15 UTC (permalink / raw)
  To: Renaud Bussières; +Cc: Org Mode List

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



> On Dec 14, 2024, at 9:51 AM, Renaud Bussières via General discussions about Org-mode. <emacs-orgmode@gnu.org> wrote:
> 
> Let's say I want to insert my yoga class in my Agenda. This class starts on date X, it is planned to repeat every week, for 8 weeks. In my "agenda.org <http://agenda.org/>" file I would write:


Another option I have used is to create the header like below for Yoga Class followed by an org-timestamp. 
* Events
** Yoga Class <2024-12-16 Mon>
*** Notes

Now while on the Yoga Class header, invoke M-x org-clone-subtree-with-time-shift.
It will prompt for how many clones, 7 in this case, and then the time-shift, +1w


** Yoga Class <2024-12-23 Mon>
*** Notes
** Yoga Class <2024-12-30 Mon>
*** Notes
** Yoga Class <2025-01-06 Mon>
*** Notes
** Yoga Class <2025-01-13 Mon>
*** Notes
** Yoga Class <2025-01-20 Mon>
*** Notes
** Yoga Class <2025-01-27 Mon>
*** Notes
** Yoga Class <2025-02-03 Mon>
*** Notes

What I like about this approach is that I can store unique notes for each one and archive really old entries. For unknown length of time cases, I will usually clone a year's worth at a time and put a reminder to clone more.

Mark


[-- Attachment #2: Type: text/html, Size: 3269 bytes --]

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

* Re: What's the proper way to define a recurring event
  2024-12-14 17:51 What's the proper way to define a recurring event Renaud Bussières via General discussions about Org-mode.
  2024-12-14 18:15 ` Mark Barton
@ 2024-12-17 17:21 ` Michael Heerdegen
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Heerdegen @ 2024-12-17 17:21 UTC (permalink / raw)
  To: Renaud Bussières via General discussions about Org-mode.
  Cc: Renaud Bussières

Renaud Bussières via "General discussions about Org-mode."
<emacs-orgmode@gnu.org> writes:

> <2024-10-07 Mon 16:00-17:30 +1w>--<2024-11-25 Mon>
>
> Then the event will appear in the agenda every day between 2024-10-07
> and 2024-11-25, that's not right. It seems like time/date ranges do
> not respect repeaters.

I can't estimate whether the syntax of org time specs could or should be
extended like that.  But as a workaround - or even as equally good
alternative - you can use diary sexps, which are able to express any
possible conditions.

For me (I am using calendar-set-date-style --> european with day and
month positions switched) your example would look like

** 16:00-17:30 Yoga
%%(and (diary-cyclic 7 7 10 2024)
       (diary-block 7 10 2024 25 11 2024)
       "16:00-17:30 Yoga Class")

Note: the entry name is taken from the return value of the expression,
the actual entry name is ignored, at least for the agenda.


Michael.


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

end of thread, other threads:[~2024-12-17 17:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-14 17:51 What's the proper way to define a recurring event Renaud Bussières via General discussions about Org-mode.
2024-12-14 18:15 ` Mark Barton
2024-12-17 17:21 ` Michael Heerdegen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.