1

below is my function for reschedule agenda item to "today + 3 days

(defun my/org-agenda-reschedule-week () 
    (interactive) 
    (org-agenda-schedule nil "+3d"))

similarly i want function for rescheduling agenda item after current time + 3 hours, these code doesn't work

(defun my/org-agenda-reschedule-hour () 
    (interactive) 
    (org-agenda-schedule nil "+3h"))

0

This function should do what you want:

(defun my/org-agenda-reschedule-hour () 
  (interactive) 
  (org-agenda-date-later-hours 3))

You can then bind it with:

(define-key org-agenda-mode-map "x" 'my/org-agenda-reschedule-hour)

Where x is whatever key you want. If you want to create more similar functions, there is also org-agenda-date-later-minutes, as well as earlier versions for both this and the hours function. Similarly, you can use (org-agenda-date-later n) to shift by n days

  • That solved my problem, i am also surprised that this function "org-agenda-date-later-hours" has not been mentioned in Org Mode PDF Manual. where can i find such functions, if i put "M-x apropos-command org-agenda" then would it list all functions for org agenda ? – nirag Jan 20 '16 at 7:11
  • @nirag, unfortunately, I don't think these functions are documented in the org manual. The way that I learned about the functions was by looking through the org-mode source code, and reading the documentation for the individual functions in the source. You can get to the source with M-x find-library org-agenda. Of course, if you already know the name of the function you are interested in, you can use C-h f and then the name of your function, and you will get the documentation with a link to the source. – elethan Jan 20 '16 at 15:18

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.