From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeova Sanctus Unus Subject: specifical scheduled/deadline timestamp Date: Sat, 22 Dec 2012 01:34:23 +0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:47102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tm6Uk-0006FO-Q5 for emacs-orgmode@gnu.org; Fri, 21 Dec 2012 12:34:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tm6Ue-0006y5-Ea for emacs-orgmode@gnu.org; Fri, 21 Dec 2012 12:34:50 -0500 Received: from mail-qc0-f180.google.com ([209.85.216.180]:63537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tm6Ue-0006xz-Aa for emacs-orgmode@gnu.org; Fri, 21 Dec 2012 12:34:44 -0500 Received: by mail-qc0-f180.google.com with SMTP id v28so2717842qcm.11 for ; Fri, 21 Dec 2012 09:34:43 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org hi,all I write a elisp code create specfical scheduled/deadline timestamp, Sometimes,we might want to create scheduled/deadline on a specfical day,such as the last work day of month. Using sexp(like <%%(org-float t 42)>) in scheduling and deadline timestamp is limited, like info says: Org mode does not know enough about the internals of each sexp function to issue early and late warnings. I write a elisp code to solve the problem,with it,all you need to do is setting a property. You can download it from here: https://github.com/chenfengyuan/elisp/blob/master/next-spec-day.el you can write your task like these: * TODO test SCHEDULED: <2013-03-29 Fri> :PROPERTIES: :NEXT-SPEC-SCHEDULED: last-workday-of-month :END: * TODO test2 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: After changing the todo state of the task,the schedule timestamp will be set automaticly.