emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [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?
@ 2024-09-30  2:00 Starlit Sky
  2024-10-17 18:08 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Starlit Sky @ 2024-09-30  2:00 UTC (permalink / raw)
  To: emacs-orgmode


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.


REPRODUCE OBSERVED BEHAVIOR

1.
```org
* TODO a repeating task
SCHEDULED: <2024-09-29 Sun 06:50 ++1h>--<2024-09-29 Sun 20:50 ++1d>
```

which results in
```org
* TODO a repeating task
SCHEDULED: <2024-09-29 Sun 07:50 ++1h>--<2024-09-30 Mon 20:50 ++1d>
```

2.
```org
* TODO a repeating task
SCHEDULED: <2024-09-29 Sun 06:50 ++1h ++1d>--<2024-09-29 Sun 20:50 ++1d>
```

which results in

```org
* TODO a repeating task
SCHEDULED: <2024-09-29 Sun 07:50 ++1h ++1d>--<2024-09-30 Mon 20:50 ++1d>
```


QUESTION

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.
> 
> ---File: org.info,  Node: Repeated tasks,  Prev: Inserting deadline/schedule,  Up: Deadlines and Scheduling


GNU EMACS AND SYSTEM INFORMATION

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.18.0, Xaw3d scroll bars)
Repository revision: 7a0f4de3c18cab43b5bff47fdab4944e006c68e4
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101011
System Description: NixOS 24.05 (Uakari)

Configured using:
 'configure
 --prefix=/nix/store/6292rj6milw5q9ln3lismxssgmbi3zkn-emacs-git-20240317.0
 --disable-build-details --with-modules --with-x-toolkit=lucid
 --with-xft --with-cairo --with-compress-install
 --with-toolkit-scroll-bars --with-native-compilation
 --without-imagemagick --without-small-ja-dic --with-tree-sitter
 --with-xinput2 --without-xwidgets'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XAW3D XDBE XIM XINPUT2 XPM
LUCID ZLIB

Important settings:
  value of $EMACSLOADPATH: 
  value of $EMACSNATIVELOADPATH: 
  value of $LC_CTYPE: pt_BR.UTF-8
  value of $LC_TIME: en_DK.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=fcitx
  locale-coding-system: utf-8-unix

Major mode: Org

Minor modes in effect:
  text-scale-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/nix/store/vfmz0hk6zvg432m2n7wgw99y8rsjw1d1-emacs-packages-deps/share/emacs/site-lisp/elpa/emacsql-20240124.1601/emacsql-sqlite hides /nix/store/vfmz0hk6zvg432m2n7wgw99y8rsjw1d1-emacs-packages-deps/share/emacs/site-lisp/elpa/emacsql-sqlite-20240119.2314/emacsql-sqlite
/nix/store/vfmz0hk6zvg432m2n7wgw99y8rsjw1d1-emacs-packages-deps/share/emacs/site-lisp/site-start hides /nix/store/6292rj6milw5q9ln3lismxssgmbi3zkn-emacs-git-20240317.0/share/emacs/site-lisp/site-start
/nix/store/vfmz0hk6zvg432m2n7wgw99y8rsjw1d1-emacs-packages-deps/share/emacs/site-lisp/elpa/let-alist-1.0.6/let-alist hides /nix/store/6292rj6milw5q9ln3lismxssgmbi3zkn-emacs-git-20240317.0/share/emacs/30.0.50/lisp/emacs-lisp/let-alist
/nix/store/vfmz0hk6zvg432m2n7wgw99y8rsjw1d1-emacs-packages-deps/share/emacs/site-lisp/elpa/compat-29.1.4.5/compat hides /nix/store/6292rj6milw5q9ln3lismxssgmbi3zkn-emacs-git-20240317.0/share/emacs/30.0.50/lisp/emacs-lisp/compat

Features:
(shadow sort mail-extr emacsbug org-clock mule-util cal-move org-element
org-persist org-id org-refile avl-tree generator oc-basic cl-extra
help-mode ol-eww eww xdg url-queue thingatpt mm-url ol-rmail ol-mhe
ol-irc ol-info ol-gnus nnselect gnus-art mm-uu mml2015 mm-view mml-smime
smime gnutls dig gnus-sum shr pixel-fill kinsoku url-file svg dom
gnus-group gnus-undo gnus-start gnus-dbus dbus compile comp-run
comp-common xml gnus-cloud nnimap nnmail mail-source utf7 nnoo
parse-time gnus-spec gnus-int gnus-range message sendmail yank-media
puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util
text-property-search mail-utils range mm-util mail-prsvr wid-edit
ol-docview doc-view filenotify jka-compr image-mode exif dired
dired-loaddefs ol-bibtex bibtex iso8601 ol-bbdb ol-w3m ol-doi
org-link-doi org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro
org-src ob-comint org-pcomplete pcomplete comint ansi-osc ansi-color
ring org-list org-footnote org-faces org-entities time-date noutline
outline icons org-version ob-emacs-lisp ob-core ob-eval org-cycle
org-table ol rx org-fold org-fold-core org-keys oc org-loaddefs
find-func cal-menu calendar cal-loaddefs org-compat org-macs format-spec
face-remap display-line-numbers emacsql-sqlite-autoloads
emacsql-autoloads emojify-logos-autoloads emojify-autoloads ht-autoloads
info dash-autoloads jinx-autoloads pdf-tools-autoloads tablist-autoloads
vterm-autoloads package browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie generate-lisp-file url-domsuf
url-util mailcap url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp
byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv
eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq
simple cl-generic indonesian philippine cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button
loaddefs theme-loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
x-toolkit xinput2 x multi-tty move-toolbar make-network-process
native-compile emacs)

Memory information:
((conses 16 278081 52237) (symbols 48 21032 0) (strings 32 75833 4767)
 (string-bytes 1 2503689) (vectors 16 37710)
 (vector-slots 8 831185 103618) (floats 8 339 61)
 (intervals 56 2065 726) (buffers 992 14))

--
Starlit Sky


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

* 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?
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2024-10-17 18:08 UTC (permalink / raw)
  To: Starlit Sky; +Cc: emacs-orgmode

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>


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

end of thread, other threads:[~2024-10-17 18:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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