0

On my emacs file, I use: ** TODO bla bla bla SCHEDULED: <2025-04-11 Fri 18:20> [%%(diary-float t 3 3)

I expect, it produce 3 entry on my calendar view C-c a, but it produce just one entry. Do someone can tell me where is the error?

2 Answers 2

2

I don't really understand what you are trying to do or why you expect three entries. And I don't understand what calendar you are talking about, although I suspect you are talking about the agenda. The entry as shown in your question will produce a single entry in the agenda: on 2025-04-11. The diary sexp is not evaluated at all. See the Timestamps section in the Org mode manual and search for Diary-style expression entries.

If you are trying to produce entries in the agenda for the third Wednesday of every month, then try:

** TODO bla bla bla <%%(diary-float t 3 3)> more stuff 

EDIT: the OP has indicated in a comment that his need is much simpler - he needs an agenda entry every Friday, starting on 2025-04-11. No need for diary sexps then - Org mode is capable of that:

** TODO bla bla bla SCHEDULED: <2025-04-11 Fri 18:20 +1w> 

or maybe just:

** TODO bla bla bla <2025-04-11 Fri 18:20 +1w> 

The difference is that the second one is basically an appointment reminder: it will appear every Friday but it will disappear on Saturday and stay away until the next Friday. The SCHEDULED entry will appear on Friday and stick around until you mark it DONE. See Deadlines and Scheduling for more details, particularly the highlighted Important: note.

EDIT 2: In a comment, the OP attempted to limit the number of repetitions by using a REPEATED property. There is no such thing as a REPEATED property: Org mode does not provide a way to set the end date. If you want something to be repeated three times, the best thing to do is to schedule the first one and then use org-clone-subtree-with-time-shift (bound to C-c C-x c): see Repeated Tasks in the manual.

Put the cursor on the headline that you want to clone and press C-c C-x c which will ask you how many clones you want to make and what the time shift should be. In your case, you already have the first one so you want to produce 2 more clones and the time shift should be +1w.

9
  • sorry for my explanation (it is an English prob) I need an entry each friday of the month starting from the date I've indicate. (Maybe that explanation is worse that the first one Commented Apr 5 at 9:42
  • No, that is a much better explanation. You don't need diary sexps for that: plain Org mode can do it. See my edit. Commented Apr 5 at 14:29
  • thi entry: * Evento ricorrente SCHEDULED: <2025-04-05 Sat 12:15 +1w> ; la prima data (venerdì 5 aprile 2025) :PROPERTIES: :REPEATED: 3 :END: this statement create more that 3 issue (one of each week.it seems ignore the REPEATED:3 entry) Commented Apr 5 at 16:35
  • 1
    There is no such thing as a REPEATED property: Org mode does not provide a way to set the end date. If you want something to be repeated three times, the best thing to do is to schedule the first one and then use org-clone-subtree-with-time-shift (bound to C-c C-x c): see Repeated Tasks in the manual. Commented Apr 5 at 16:54
  • 1
    I added this last comment to the answer as well. Commented Apr 5 at 17:06
1

Your question is extremely vague. You should include details to indicate exactly what you expected, and exactly what you got. That said, the best first step is to simply use C-h f to read the documentation for diary-float:

diary-float is a natively compiled function defined in diary-lib.el.gz. Signature (diary-float MONTH DAYNAME N &optional DAY MARK) Documentation Diary entry for the Nth DAYNAME after/before MONTH DAY. DAYNAME=0 means Sunday, DAYNAME=1 means Monday, and so on. If N>0, use the Nth DAYNAME after MONTH DAY. If N<0, use the Nth DAYNAME before MONTH DAY. DAY defaults to 1 if N>0, and MONTH's last day otherwise. MONTH can be a list of months, an integer, or t (meaning all months). Optional MARK specifies a face or single-character string to use when highlighting the day in the calendar. 

You called it with 3 for DAYNAME, which means Wednesday. You specified 3 for N also, so that’s the 3rd Wednesday of the month. And you gave t for MONTH, meaning all months. So I would expect that to create a calendar entry for every third Wednesday of every month in the year. Did it do something else?

1
  • The diary sexp does not do anything in the context that the OP describes, so it is a red herring. I believe the OP is asking for the "weekly" agenda (C-c a a if one uses the recommendation in the manual, but his description is missing the second a, so who knows?): that will show one entry for the SCHEDULED date - that's all. Commented Apr 5 at 1:33

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.