From: Michael Welle <mwe012008@gmx.net>
To: emacs-orgmode@gnu.org
Subject: Re: Recurring tasks and arbitrary properties
Date: Sun, 22 Jan 2017 14:27:47 +0100 [thread overview]
Message-ID: <87inp7fcmk.fsf@luisa.c0t0d0s0.de> (raw)
In-Reply-To: <87h94rb59x.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sun, 22 Jan 2017 14:20:10 +0100")
Hello,
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Michael Welle <mwe012008@gmx.net> writes:
>
>> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>>>
>>> Michael Welle <mwe012008@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
next prev parent reply other threads:[~2017-01-22 13:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-21 19:06 Recurring tasks and arbitrary properties Michael Welle
2017-01-22 13:09 ` Nicolas Goaziou
2017-01-22 13:17 ` Michael Welle
2017-01-22 13:20 ` Nicolas Goaziou
2017-01-22 13:27 ` Michael Welle [this message]
2017-01-22 13:37 ` Nicolas Goaziou
2017-01-22 13:56 ` Michael Welle
2017-01-22 14:01 ` Nicolas Goaziou
2017-01-22 14:08 ` Michael Welle
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87inp7fcmk.fsf@luisa.c0t0d0s0.de \
--to=mwe012008@gmx.net \
--cc=emacs-orgmode@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.