0

It's a lot of times that I do not use emacs (org mode) can someone remember me how can I set a statement to be shown in calendar for N days? I remember it's like this, but I do not remember the right syntax

** xxx yyy <2023-07-07 Fri 7:30 +1d>
1
  • " how can I set a statement to be shown in calendar for N days?" - do you really mean the calendar or do you mean the org agenda?
    – NickD
    Commented Jul 7, 2023 at 12:39

1 Answer 1

2

Your answer would repeat every day (+1d) infinitely, rather than for a finite N number of days.

If all you want is a calendar entry that repeats every day from one date to another, at the same time, then you could just employ a time/date range.

* xxx yyy 
<2023-07-07 Fri 07:30>-<2023-07-10 Mon 07:30>

Otherwise, if you want to repeat your event a finite number of dates but have more control over them, for example to tweak their times or to give each its own TODO, then Org makes it easy to write an initial event which is then cloned a certain number of times. You could start with, for example:

* xxx yyy 
<2023-07-07 Fri 07:30>

Then run M-x org-clone-event-with-time-shift (C-c C-x c) which will ask you the number of clones to produce -- let's say 3, for example -- and then the date shift between them -- let's say every day (+1d) -- which in total will produce:

* xxx yyy
<2023-07-07 Fri 07:30>
* xxx yyy
<2023-07-08 Sat 07:30>
* xxx yyy
<2023-07-09 Sun 07:30>
* xxx yyy
<2023-07-10 Mon 07:30>

Now you can edit each of these as you please.


Addition (19 Jul 2023):

In the comments RenatoP is asking about how to add multiple times to one day. One could simply start with this,

* xxx yyy
<2023-07-10 Mon 07:30>
<2023-07-10 Mon 11:30>

and then run M-x org-clone-event-with-time-shift as above, and it will shift all the date stamps.

Note, date stamps are conventionally placed on a line below the header title (xxx yyy), rather than the same line.

4
  • but if I would repeat the event twice a day (i.e. at 07:30 and 14:30 of the same day for 4 days. Is it possible?
    – RenatoP
    Commented Jul 7, 2023 at 14:14
  • This seems a different question than the original. Just add multiple date stamps under each heading?
    – kokoro
    Commented Jul 12, 2023 at 10:42
  • you mean in this way? * xxx yyy <2023-07-10 Mon 07:30> * xxx yyy <2023-07-10 Mon 11:30>
    – RenatoP
    Commented Jul 13, 2023 at 11:12
  • Sure, or just * xxx yyy <2023-07-10 Mon 07:30> <2023-07-10 Mon 11:30>
    – kokoro
    Commented Jul 19, 2023 at 14:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.