From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Boudreault Subject: Re: Lock CLOSED tag Date: Fri, 17 Jul 2009 08:54:02 -0400 Message-ID: <200907170854.03027.aboudreault@mapgears.com> References: <200907101024.33972.aboudreault@mapgears.com> <87bpnk19ay.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MRmwq-0005qN-4p for emacs-orgmode@gnu.org; Fri, 17 Jul 2009 08:54:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MRmwl-0005qA-Ur for emacs-orgmode@gnu.org; Fri, 17 Jul 2009 08:53:59 -0400 Received: from [199.232.76.173] (port=49354 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MRmwl-0005q7-Pv for emacs-orgmode@gnu.org; Fri, 17 Jul 2009 08:53:55 -0400 Received: from smtp121.iad.emailsrvr.com ([207.97.245.121]:58482) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MRmwl-0003aK-F4 for emacs-orgmode@gnu.org; Fri, 17 Jul 2009 08:53:55 -0400 In-Reply-To: <87bpnk19ay.fsf@bzg.ath.cx> Content-Disposition: inline List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org Hi Bastien, I've take a look at the code you sugested to me. It didn't work. After further documentation reading... it's definitively normal. "CLOSED" is not a todo tag string... but a property (logdone). At this point, I have two choice: - If a similar hook exist for the property update when a tag has changed - Make a string list with all my "closed/done/fixed ... tags" and block those changes. This way, I'll force a manual tag change when the current tag is a closed one. But, I would prefer the first idea because I normally switch my todo tag with shift+(left|right)... so it pass through my 3 different todo sequences. Thanks Alan On July 16, 2009 07:45:41 pm Bastien wrote: > Alan Boudreault writes: > > Is it possible to lock the CLOSED tag ? > > Yes, try this: > > --8<---------------cut here---------------start------------->8--- > (add-hook 'org-blocker-hook 'my-blocker-function) > > (defun my-blocker-function (change-plist) > "Prevent TODO changes if CLOSED." > (not (equal (plist-get change-plist :from) "CLOSED"))) > --8<---------------cut here---------------end--------------->8--- > > Careful as it throws an error. -- Alan Boudreault Mapgears http://www.mapgears.com