I am customizing org-clock-in-hook to do some action after a item is clocked in.But first I need to make sure whether the clocked-in item is a plain todo item or a agenda item (scheduled or deadlined).

I has dig through the org mode source,but related code is long and it's all regular expressions.

Any guy can provide a elegant solution?


The scheduled and deadline status of an entry is contained in the SCHEDULED and DEADLINE special properties. As with other properties, you can read them with org-entry-get: (org-entry-get (point) "SCHEDULED"). It returns the timestamp (as a string) if there is one and nil otherwise.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.