Hello, Nicolas Goaziou <m...@nicolasgoaziou.fr> writes:
> Michael Welle <mwe012...@gmx.net> writes: > >> Nicolas Goaziou <m...@nicolasgoaziou.fr> writes: >>> >>> Michael Welle <mwe012...@gmx.net> writes: >>> >>>> a task like this behaves like a recurring task, i.e. if I set the task >>>> state to DONE it is automatically switched back to TODO. Is that the >>>> intended behaviour? >>>> >>>> * TODO task1 >>>> :PROPERTIES: >>>> :FOO: <2017-03-12 Sun ++1w> >>>> :END: >>> >>> Historically, location of regular (i.e., non scheduled non deadline) >>> active time stamps in an entry has always been sloppy. In particular, >>> Org Agenda happily processes active time stamps in properties drawers. >>> >>> IMO, this shouldn't be the case, but I can see a use for it and doing >>> otherwise would probably break a lot of documents for little benefit. >>> >>> So, yes, this is the intended behaviour. >> >> hmm, what's a good way to work around that? Removing, let's say, the >> brackets before storing that value? > > Couldn't you use inactive time stamps? I want to do something like this: (defun hmw/org-deactivate-recurring-task () "Deactivate a recurring task. The value of the SCHEDULED property is stored in the property referenced by `hmw/org-scheduled-property-backup', so it can be restored later. The task's state is set to the value of `hmw/org-deactivated-recurring-task-state'." (interactive) (when (org-entry-is-todo-p) (save-excursion (org-back-to-heading t) (let* ((pom (point-at-bol)) (val (org-entry-get pom "SCHEDULED"))) (if val (progn (org-entry-put pom hmw/org-scheduled-property-backup val) (org-entry-put pom "SCHEDULED" nil) (org-todo hmw/org-deactivated-recurring-task-state))))))) I want to 'hide' the value of the SCHEDULED property and later restore it. I can use inactive time stamps. But that means that I have to change the value when deactivating the task and again, later when I activate the task again. But it would have been nicer without doing so ;). Thanks for your help. Regards hmw