emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question About Nuking The Priority Of A Task After Its Been Marked A


From: Peter Hardy
Subject: Re: Question About Nuking The Priority Of A Task After Its Been Marked As 'DONE'
Date: Sat, 11 Dec 2021 09:51:05 +1100
User-agent: Cyrus-JMAP/3.5.0-alpha0-4514-g2bdc19e04f-fm-20211209.002-g2bdc19e0



On Sat, 11 Dec 2021, at 5:55 AM, Samuel Banya wrote:
However, one thing I would want to know is this:
- Is it possible to automatically delete the '#' priority value of a task after a task has been marked as 'DONE', 'CANCELLED', etc?

Is this done via a hook function?

Probably!

The org documentation (https://orgmode.org/worg/doc.html) includes a list of all of the hooks it supports. If you search it you'll find `org-after-todo-state-change-hook`, which seems to be exactly what you need. Keep digging, and you'll find the `org-priority` function to set an item's priority.

Looks like all you'd need to do is write a hook function to check the new state, and then change the priority.

--
Peter

reply via email to

[Prev in Thread] Current Thread [Next in Thread]