From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Deadline count down in working days Date: Fri, 28 Mar 2008 15:43:59 +0100 Message-ID: <2E48189C-77E4-4869-BD9D-4B9A7D2FB7F3@science.uva.nl> References: <47EB8A87.4070600@calicojack.co.uk> Mime-Version: 1.0 (Apple Message framework v919.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JfFoN-00012h-SY for emacs-orgmode@gnu.org; Fri, 28 Mar 2008 10:44:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JfFoM-00012S-Vo for emacs-orgmode@gnu.org; Fri, 28 Mar 2008 10:44:07 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JfFoM-00012P-Qo for emacs-orgmode@gnu.org; Fri, 28 Mar 2008 10:44:06 -0400 Received: from fg-out-1718.google.com ([72.14.220.158]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JfFoM-0006B4-7q for emacs-orgmode@gnu.org; Fri, 28 Mar 2008 10:44:06 -0400 Received: by fg-out-1718.google.com with SMTP id d23so337655fga.30 for ; Fri, 28 Mar 2008 07:44:03 -0700 (PDT) In-Reply-To: <47EB8A87.4070600@calicojack.co.uk> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rick Moynihan Cc: emacs-orgmode On Mar 27, 2008, at 12:52 PM, Rick Moynihan wrote: > Hi all, > > I realise this functionality is probably in org already, but I can't > seem to find it mentioned anywhere (though perhaps I'm not looking > very hard). > > Currently when I look at my agenda I see this: > > gtd: In 5 d.: TODO [#A] A particular work related task > > The 5d countdown includes weekends however. Is it possible to get > org to exclude weekends from these countdowns, so I know how many > working days I have? > > As I use org for both, personal and work related stuff what might be > nice is if org could calculate work tasks in working-days and > personal tasks in week-days for the agenda view e.g: > > Thursday 27 March 2008 > gtd: In 2 wd.: TODO [#A] A particular work related > task :WORK: > gtd: In 4 d. : TODO [#A] Arrange holiday > insurance :PERSONAL: > > Where both tasks would be due on the same day (Monday 31 March > 2008). Here I've changed the suffix for the work task to wd to > indicated working-days and left the d suffix to indicate days. > > Thanks again! Hmmm, I personally do not like this idea too much, I would find it confusing. And it is not easy to implement, because you might want to remove holidays as well etc. So what I will do is give you a hook to customize this yourself: (setq org-agenda-deadline-leaders '("Deadline: " my-org-deadline- leader)) where my-org-deadline-leader is a function that will return the correct string that you would like to have as a leader. For inspiration and example, here is on that gives the time in weeks or month if it is too long. (defun org-deadline-leader (diff date) (cond ((> (abs diff) 61) (format "In %3d m.: " (/ diff 30.6))) ((> (abs diff) 21) (format "In %3d w.: " (/ diff 7.0))) (t (format "In %3d d.: " diff)))) This is in the git repo now. - Carsten