From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Carsten Dominik" Subject: Re: [ feature request ] colourful timestamps Date: Mon, 17 Dec 2007 10:12:40 +0100 Message-ID: References: <87bq9750d6.fsf@shellarchive.co.uk> <87ejdvh4qz.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J4C1o-0000Rq-0A for emacs-orgmode@gnu.org; Mon, 17 Dec 2007 04:12:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J4C1l-0000Qn-Pl for emacs-orgmode@gnu.org; Mon, 17 Dec 2007 04:12:47 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J4C1l-0000QW-AB for emacs-orgmode@gnu.org; Mon, 17 Dec 2007 04:12:45 -0500 Received: from wa-out-1112.google.com ([209.85.146.180]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J4C1k-0007L1-Or for emacs-orgmode@gnu.org; Mon, 17 Dec 2007 04:12:45 -0500 Received: by wa-out-1112.google.com with SMTP id k34so3244238wah.10 for ; Mon, 17 Dec 2007 01:12:41 -0800 (PST) In-Reply-To: <87ejdvh4qz.fsf@bzg.ath.cx> Content-Disposition: inline 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: Bastien Cc: emacs-orgmode@gnu.org I am taking this patch, thanks. - Carsten On Dec 9, 2007 11:39 PM, Bastien wrote: > Hi Phil, > > Phil Jackson writes: > > > Something I thought might be nice is highlighting of timestamps > > according to there relativity to time(). > > > > For example, at time of writing, <2006-12-11> would be red, <2007-12-03 > > Mon 19:00> pink. Perhaps for customisation: > > > > (setq org-timestamp-colour-map > > '(("<2h" . 'face) > > ("<10m" . 'face))) > > I like the general idea of having feedback about the proximity of a > deadline or time-stamp. But I think doing this interactively is better, > since the values like "<2h" "<10m" (in your example) are very likely to > change quite often, no? > > In the same spirit, I've written this, which let you check for deadlines > or scheduled items before a date (strings like "+2d" are okay): > > --8<---------------cut here---------------start------------->8--- > (defun org-check-before-date (date) > "Check if there are deadlines or scheduled entries before DATE." > (interactive (list (org-read-date))) > (let ((case-fold-search nil) > (regexp (concat "\\<\\(" org-deadline-string > "\\|" org-scheduled-string > "\\) *<\\([^>]+\\)>")) > (callback > (lambda () (time-less-p > (org-time-string-to-time (match-string 2)) > (org-time-string-to-time date))))) > (message "%d entries before %s" > (org-occur regexp nil callback) date))) > --8<---------------cut here---------------end--------------->8--- > > If you want to permanently add this to `org-sparse-trees', here is a > patch against 5.16b. > > > -- > Bastien > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > >