emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bastienguerry@googlemail.com>
To: Alan Boudreault <aboudreault@mapgears.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Lock CLOSED tag
Date: Fri, 17 Jul 2009 17:29:03 +0200	[thread overview]
Message-ID: <87tz1b72gw.fsf@bzg.ath.cx> (raw)
In-Reply-To: <200907171116.37762.aboudreault@mapgears.com> (Alan Boudreault's message of "Fri, 17 Jul 2009 11:16:37 -0400")

Alan Boudreault <aboudreault@mapgears.com> 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	other threads:[~2009-07-17 15:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-10 14:24 Lock CLOSED tag Alan Boudreault
2009-07-10 17:36 ` Nicolas Goaziou
2009-07-10 18:00   ` Alan Boudreault
2009-07-16 23:45 ` Bastien
2009-07-17 12:54   ` Alan Boudreault
2009-07-17 14:27     ` Bastien
2009-07-17 15:16       ` Alan Boudreault
2009-07-17 15:29         ` Bastien [this message]
2009-07-17 15:39           ` Alan Boudreault

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tz1b72gw.fsf@bzg.ath.cx \
    --to=bastienguerry@googlemail.com \
    --cc=aboudreault@mapgears.com \
    --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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).