orgbox
orgbox copied to clipboard
Schedule deadline
What options are needed for scheduling deadline with orgbox?
deadline options:
- today
- end of week
- end of month
- etc.
(See also #9)
Thank you for this library, Yasuhito. I really enjoy using orgbox for scheduled tasks but miss having it for deadlines as well.
In case someone is interested in a deadline version it can be enough to temporarily replace org-schedule
with org-deadline
and call the originals. Works for me! :)
;; Add deadline versions of orgbox
(require 'cl-lib)
(defun my/orgbox-deadline (&rest args)
"Like orgbox-schedule but for deadlines. Passes through ARGS."
(interactive (advice-eval-interactive-spec
(cadr (interactive-form #'orgbox-schedule))))
(cl-letf (((symbol-function #'org-schedule) #'org-deadline))
(apply #'orgbox-schedule args)))
(defun my/orgbox-agenda-deadline (&rest args)
"Like orgbox-agenda-schedule but for deadlines. Passes through ARGS."
(interactive (advice-eval-interactive-spec
(cadr (interactive-form #'orgbox-agenda-schedule))))
(cl-letf (((symbol-function #'org-schedule) #'org-deadline))
(apply #'orgbox-agenda-schedule args)))
(define-key org-mode-map (kbd "C-c C-d") 'my/orgbox-deadline)
(define-key org-agenda-mode-map (kbd "C-c C-d") 'my/orgbox-agenda-deadline)