emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Lock CLOSED tag


From: Bastien
Subject: Re: [Orgmode] Lock CLOSED tag
Date: Fri, 17 Jul 2009 17:29:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Alan Boudreault <address@hidden> writes:

> When I said "todo tag"... I meant "todo keyword". Here's a example of what 
> I'm 
> trying to achieve:
>
> *** FIXED a bug                       
>       CLOSED: [2009-07-08 Wed 16:49]
>
> By mistake, I can set the item to "Reopened" by example. And If I switch it 
> back to the proper todo keywork "FIXED". The closed property is overwrited. 

Then try this instead:

--8<---------------cut here---------------start------------->8---
(add-hook 'org-blocker-hook 'my-blocker-function)

(defun my-blocker-function (change-plist)
  "Prevent TODO changes if the TODO keyword is FIXED."
  (not (equal (plist-get change-plist :from) "FIXED")))
--8<---------------cut here---------------end--------------->8---

> I'm trying to block the update of the CLOSED Property IF it already exist.

If the CLOSED property is only set the first time you switch to FIXED,
and if the FIXED todo keyword prevents any todo change, then the blocked
FIXED todo keyword should prevent the CLOSED property to change.

> Thanks For your help, and sorry for my english: I'm a french canadian
> ;)

Ah!  Je vous en prie :)

-- 
 Bastien




reply via email to

[Prev in Thread] Current Thread [Next in Thread]