emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Starlit Sky <starlitsky@gmx.ca>
Cc: emacs-orgmode@gnu.org
Subject: Re: [HELP] How to have a repeating task that begins at 06:50 and ++1h until 20:50, and then when DONE the last repeater for that day, it would ++1d at 06:50?
Date: Thu, 17 Oct 2024 18:08:44 +0000	[thread overview]
Message-ID: <871q0ezjo3.fsf@localhost> (raw)
In-Reply-To: <87o745dhnu.fsf@gmx.se>

Starlit Sky <starlitsky@gmx.ca> writes:

> EXPECTED BEHAVIOR
>
> I want to have a repeating task that begins at 06:50 and ++1h until
> 20:50, and then when DONE the last repeater for that day (20:50), it would ++1d at 06:50 and ++1h until 20:50, and so on. I've tried many things, but nothing seems to work.

What you want is not how repeaters work in Org mode.
In Org mode, each repeater is simply applied independently of others,
which is exactly what you observe.

No more complex behavior is current available out of the box.

> SCHEDULED: <2024-09-29 Sun 06:50 ++1h ++1d>--<2024-09-29 Sun 20:50 ++1d>
> ```
> ...

... and this is simply ambiguous Org mode syntax. As an implementation
detail, Org mode will use the first repeater present in each
timestamp. The second repeater in the first part of the timestamp is
ignored.

> Is there something I'm doing wrong with timing syntax, or do I really need to do the following instead?
>
>> An alternative to using a repeater is to create a number of copies of a task subtree, with dates shifted in each copy.  The command ‘C-c C-x c’ was created for this purpose; it is described in *note Structure Editing.

As an alternative, you can try using `org-todo-repeat-hook' that is
evaluated after all the timestamps with repeaters in a heading are
updated. You can manually go through them again, applying custom
repeater logic written by yourself, in Elisp. See
`org-auto-repeat-maybe' code as an example what you need to do to update
the repeaters from Elisp.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


      reply	other threads:[~2024-10-17 18:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30  2:00 [HELP] How to have a repeating task that begins at 06:50 and ++1h until 20:50, and then when DONE the last repeater for that day, it would ++1d at 06:50? Starlit Sky
2024-10-17 18:08 ` Ihor Radchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871q0ezjo3.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=starlitsky@gmx.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).