emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alan Boudreault <aboudreault@mapgears.com>
To: Bastien <bastienguerry@googlemail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Lock CLOSED tag
Date: Fri, 17 Jul 2009 08:54:02 -0400	[thread overview]
Message-ID: <200907170854.03027.aboudreault@mapgears.com> (raw)
In-Reply-To: <87bpnk19ay.fsf@bzg.ath.cx>

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 <aboudreault@mapgears.com> 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

  reply	other threads:[~2009-07-17 12:54 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 [this message]
2009-07-17 14:27     ` Bastien
2009-07-17 15:16       ` Alan Boudreault
2009-07-17 15:29         ` Bastien
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=200907170854.03027.aboudreault@mapgears.com \
    --to=aboudreault@mapgears.com \
    --cc=bastienguerry@googlemail.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).