Skip to content

Advanced date handling for scheduled tasks in org-mode

License

Notifications You must be signed in to change notification settings

jsirpoma/next-spec-day

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

next-spec-day

Advanced date handling for scheduled tasks in org-mode

This is not my code - upstream is here: https://github.com/chenfengyuan/elisp/blob/master/next-spec-day.el

I simply created this repo to make it easy to use in emacs for myself.

How to use it

  1. add (load "/path/to/next-spec-day") to your dot emacs file.
  2. set NEXT-SPEC-DEADLINE and/or NEXT-SPEC-SCHEDULED property of a TODO task,like this:
    * TODO test
      SCHEDULED: <2013-06-16 Sun> DEADLINE: <2012-12-31 Mon -3d>
      :PROPERTIES:
      :NEXT-SPEC-DEADLINE: (= (calendar-extract-day date) (calendar-last-day-of-month (calendar-extract-month date) (calendar-extract-year date)))
      :NEXT-SPEC-SCHEDULED: (org-float 6 0 3)
      :END:
        

    The value of NEXT-SPEC-DEADLINE will return non-nil if date is last day of month,and the value of NEXT-SPEC-SCHEDULED will return non-nil if date is the fathers’ day (the third Sunday of June).

  3. Then, when you change the TODO state of that tasks,the timestamp will be changed automatically (include lead time of warnings settings).

Notes

  1. Execute (setq next-spec-day-runningp nil) after your sexp signal some errors,
  2. You can also use some useful sexp from next-spec-day-alist,like:
    * TODO test
      SCHEDULED: <2013-03-29 Fri>
      :PROPERTIES:
      :NEXT-SPEC-SCHEDULED: last-workday-of-month
      :END:
        
  3. If you encounter some errors like ‘org-insert-time-stamp: Wrong type argument: listp, “<2013-03-29 Mon>”’ when changing the TODO state, please try a new version of org mode. To use the new version:

About

Advanced date handling for scheduled tasks in org-mode

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 100.0%