emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: Rick Moynihan <rick@calicojack.co.uk>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Deadline count down in working days
Date: Fri, 28 Mar 2008 15:43:59 +0100	[thread overview]
Message-ID: <2E48189C-77E4-4869-BD9D-4B9A7D2FB7F3@science.uva.nl> (raw)
In-Reply-To: <47EB8A87.4070600@calicojack.co.uk>


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

      parent reply	other threads:[~2008-03-28 14:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-27 11:52 Deadline count down in working days Rick Moynihan
2008-03-28  8:11 ` Rainer Stengele
2008-03-28 14:43 ` Carsten Dominik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2E48189C-77E4-4869-BD9D-4B9A7D2FB7F3@science.uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=rick@calicojack.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).