Q: how can I make org-mode
warn me when I'm about to schedule a task on top of another task?
I frequently schedule tasks or meetings (with org-deadline
or org-schedule
) at a specific hour on some day in the distant future. However, I rarely remember what I already have scheduled on that day, and often discover later that I have double-booked a time slot.
Example: I use org-deadline
to schedule a meeting for next Thursday from 9am-10am, but already have a preexisting meeting next Thursday from 8:30am-10:30am.
Is there any way, when entering a timestamp/scheduled event/deadline, to have org-mode
warn me when I'm about to double-book a timeslot?
org-todo-keywords
, so that I (or another forum participant) can give a precise sample answer? Just the ones used with deadlines and scheduling are sufficient.(defun example () "Doc-string." (interactive) (goto-char (point-max)) (while (re-search-backward "\\* \\(TODO\\|WORK\\|DONE\\)" nil t) (unless (org-at-heading-p) (org-back-to-heading t)) (let* ( (element (org-element-at-point)) (todo-state (org-element-property :todo-keyword element)) (deadline (ignore-errors (org-element-property :deadline element))) (deadline-time-stamp (ignore-errors (time-to-days (org-time-string-to-time (org-element-property :raw-value deadline))))) (today (time-to-days (current-time))) (title (org-element-property :title element)) ) INSERT-CONDITIONS-HERE )))
scheduled
. The example illustrates how to extract various values from an org-mode todo entry.