From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Welle Subject: Re: Recurring tasks and arbitrary properties Date: Sun, 22 Jan 2017 14:27:47 +0100 Message-ID: <87inp7fcmk.fsf@luisa.c0t0d0s0.de> References: <87wpdo6xmr.fsf@luisa.c0t0d0s0.de> <87tw8rb5rg.fsf@nicolasgoaziou.fr> <87shobfd39.fsf@luisa.c0t0d0s0.de> <87h94rb59x.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVIBa-00017L-8P for emacs-orgmode@gnu.org; Sun, 22 Jan 2017 08:27:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cVIBX-0005U6-4F for emacs-orgmode@gnu.org; Sun, 22 Jan 2017 08:27:58 -0500 Received: from mout.gmx.net ([212.227.15.18]:59126) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cVIBW-0005Su-Qv for emacs-orgmode@gnu.org; Sun, 22 Jan 2017 08:27:55 -0500 Received: from stella.c0t0d0s0.de ([89.15.236.235]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MhRI2-1crtEo1Gs6-00MdAE for ; Sun, 22 Jan 2017 14:27:52 +0100 Received: from Stella (stella.c0t0d0s0.de [192.168.42.1]) by stella.c0t0d0s0.de (Postfix) with ESMTP id 2107AC45FC for ; Sun, 22 Jan 2017 14:27:47 +0100 (CET) In-Reply-To: <87h94rb59x.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sun, 22 Jan 2017 14:20:10 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hello, Nicolas Goaziou writes: > Michael Welle writes: > >> Nicolas Goaziou writes: >>> >>> Michael Welle 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