* Lock CLOSED tag
@ 2009-07-10 14:24 Alan Boudreault
2009-07-10 17:36 ` Nicolas Goaziou
2009-07-16 23:45 ` Bastien
0 siblings, 2 replies; 9+ messages in thread
From: Alan Boudreault @ 2009-07-10 14:24 UTC (permalink / raw
To: emacs-orgmode
Hi,
Is it possible to lock the CLOSED tag ? It may happen that I set back a FIXED
tag to TODO by mistake, The problem is that when I re-set it to FIXED, the
closed tag is overwrited. I would like to lock the closed tag as soon as it is
set to a done tag.
Best regards,
Alan
--
Alan Boudreault
Mapgears
http://www.mapgears.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Lock CLOSED tag
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
1 sibling, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2009-07-10 17:36 UTC (permalink / raw
To: Alan Boudreault; +Cc: emacs-orgmode
Alan Boudreault <aboudreault@mapgears.com> writes:
Hello,
It's maybe not what you're looking for, but you can leave org-log-done
to nil and simply define org-todo-keywords with something like :
(setq org-todo-keywords '(sequence "TODO(t)" "|" "FIXED(f!)"))
Nothing should be overwritten then.
HTH,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Lock CLOSED tag
2009-07-10 17:36 ` Nicolas Goaziou
@ 2009-07-10 18:00 ` Alan Boudreault
0 siblings, 0 replies; 9+ messages in thread
From: Alan Boudreault @ 2009-07-10 18:00 UTC (permalink / raw
To: Nicolas Goaziou; +Cc: emacs-orgmode
Hello,
I didn't know that I could log things like that. Thanks for that hint!
Unfortunately, I would prefer to have only one entry and be sure that it wont
be overwrited by mistake.
Alan
On July 10, 2009 01:36:45 pm Nicolas Goaziou wrote:
> Alan Boudreault <aboudreault@mapgears.com> writes:
>
>
> Hello,
>
> It's maybe not what you're looking for, but you can leave org-log-done
> to nil and simply define org-todo-keywords with something like :
>
> (setq org-todo-keywords '(sequence "TODO(t)" "|" "FIXED(f!)"))
>
> Nothing should be overwritten then.
>
> HTH,
--
Alan Boudreault
Mapgears
http://www.mapgears.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Lock CLOSED tag
2009-07-10 14:24 Lock CLOSED tag Alan Boudreault
2009-07-10 17:36 ` Nicolas Goaziou
@ 2009-07-16 23:45 ` Bastien
2009-07-17 12:54 ` Alan Boudreault
1 sibling, 1 reply; 9+ messages in thread
From: Bastien @ 2009-07-16 23:45 UTC (permalink / raw
To: Alan Boudreault; +Cc: emacs-orgmode
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.
--
Bastien
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Lock CLOSED tag
2009-07-16 23:45 ` Bastien
@ 2009-07-17 12:54 ` Alan Boudreault
2009-07-17 14:27 ` Bastien
0 siblings, 1 reply; 9+ messages in thread
From: Alan Boudreault @ 2009-07-17 12:54 UTC (permalink / raw
To: Bastien; +Cc: emacs-orgmode
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Lock CLOSED tag
2009-07-17 12:54 ` Alan Boudreault
@ 2009-07-17 14:27 ` Bastien
2009-07-17 15:16 ` Alan Boudreault
0 siblings, 1 reply; 9+ messages in thread
From: Bastien @ 2009-07-17 14:27 UTC (permalink / raw
To: Alan Boudreault; +Cc: emacs-orgmode
Hi Alan,
Alan Boudreault <aboudreault@mapgears.com> writes:
> 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:
I assumed your original question was about locking a CLOSED todo
keywords...
> - If a similar hook exist for the property update when a tag has changed
No. For now `org-blocker-hook' can only handle todo changes.
> - 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.
I don't understand... can you give an example?
> 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.
What you mean by "todo tag" is a TODO keyword, right? "Tag" has as
special meaning in Org. I think what you try to achieve can be better
achieved wigth TODO keywords than with tags.
Please do insist if I don't cleerly understand.
--
Bastien
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Lock CLOSED tag
2009-07-17 14:27 ` Bastien
@ 2009-07-17 15:16 ` Alan Boudreault
2009-07-17 15:29 ` Bastien
0 siblings, 1 reply; 9+ messages in thread
From: Alan Boudreault @ 2009-07-17 15:16 UTC (permalink / raw
To: Bastien; +Cc: emacs-orgmode
Hi Bastien,
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.
I'm trying to block the update of the CLOSED Property IF it already exist.
Thanks For your help, and sorry for my english: I'm a french canadian ;)
Alan
On July 17, 2009 10:27:15 am Bastien wrote:
> Hi Alan,
>
> Alan Boudreault <aboudreault@mapgears.com> writes:
> > 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:
>
> I assumed your original question was about locking a CLOSED todo
> keywords...
>
> > - If a similar hook exist for the property update when a tag has changed
>
> No. For now `org-blocker-hook' can only handle todo changes.
>
> > - 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.
>
> I don't understand... can you give an example?
>
> > 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.
>
> What you mean by "todo tag" is a TODO keyword, right? "Tag" has as
> special meaning in Org. I think what you try to achieve can be better
> achieved wigth TODO keywords than with tags.
>
> Please do insist if I don't cleerly understand.
--
Alan Boudreault
Mapgears
http://www.mapgears.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Lock CLOSED tag
2009-07-17 15:16 ` Alan Boudreault
@ 2009-07-17 15:29 ` Bastien
2009-07-17 15:39 ` Alan Boudreault
0 siblings, 1 reply; 9+ messages in thread
From: Bastien @ 2009-07-17 15:29 UTC (permalink / raw
To: Alan Boudreault; +Cc: emacs-orgmode
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Lock CLOSED tag
2009-07-17 15:29 ` Bastien
@ 2009-07-17 15:39 ` Alan Boudreault
0 siblings, 0 replies; 9+ messages in thread
From: Alan Boudreault @ 2009-07-17 15:39 UTC (permalink / raw
To: Bastien; +Cc: emacs-orgmode
That will not work... because I have all those todo keyword that also means
"fixed":
Done, Delegated, deferred, wont fix, fixed, canceled.
That's why I said that I should pass through a list that contain all keywords.
But... that wont work properly if I want to set my item to the "BUG" keyword
passing with shift+arrow because I have 3 different sequences defined.
Anyway.. will try to find the proper solution for that.
Alan
On July 17, 2009 11:29:03 am Bastien wrote:
> 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 :)
--
Alan Boudreault
Mapgears
http://www.mapgears.com
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-07-17 15:40 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2009-07-17 15:39 ` Alan Boudreault
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.