Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schedule deadline #12

Open
yasuhito opened this issue May 29, 2014 · 1 comment
Open

Schedule deadline #12

yasuhito opened this issue May 29, 2014 · 1 comment

Comments

@yasuhito
Copy link
Owner

What options are needed for scheduling deadline with orgbox?

deadline options:

  • today
  • end of week
  • end of month
  • etc.

(See also #9)

@yasuhito yasuhito self-assigned this May 29, 2014
@ZaneA
Copy link

ZaneA commented Aug 2, 2019

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants