Hi Eraldo,
On 2009-10-19 02:40:19(+0200), Eraldo Helal wrote:
> I have a keyword "CATEGORY" which I use on headlines to make me aware
> that they define a category for everything below them.
[snip]
> Is it possible to let emacs know that every headline with the
> "CATEGORY" todo-keyword should be used as a category?
[snip]
> Any ideas on how to get there or feedback on the idea?
I tend to set categories on any task with lots of subtasks for the same reason.
I do this by setting the CATEGORY property on the top level task, usually by
hand as I want to keep the category names short. I think the inline #+CATEGORY
lines are deprecated in favour of using properties.
Add the following to your .emacs;
--8<---------------cut here---------------start------------->8---
(add-hook 'org-after-todo-state-change-hook
(lambda ()
(if (string= state "CATEGORY")
(save-excursion
(org-back-to-heading)
(org-set-property "CATEGORY"
(nth 4 (org-heading-components)))))))
--8<---------------cut here---------------end--------------->8---
When you set the todo state of an entry to CATEGORY, it will copy the headline
text to the CATEGORY property.
James
--
|-<James TD Smith>-<email/[email protected]>-|
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-orgmode