From: "Carsten Dominik" <dominik@science.uva.nl>
To: Bastien <bzg@altern.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: [ feature request ] colourful timestamps
Date: Mon, 17 Dec 2007 10:12:40 +0100 [thread overview]
Message-ID: <acf852aa0712170112m758534bah1a6f8992023f4195@mail.gmail.com> (raw)
In-Reply-To: <87ejdvh4qz.fsf@bzg.ath.cx>
I am taking this patch, thanks.
- Carsten
On Dec 9, 2007 11:39 PM, Bastien <bzg@altern.org> wrote:
> Hi Phil,
>
> Phil Jackson <phil@shellarchive.co.uk> 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
>
>
prev parent reply other threads:[~2007-12-17 9:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-03 14:17 [ feature request ] colourful timestamps Phil Jackson
2007-12-09 22:39 ` Bastien
2007-12-10 22:27 ` Phil Jackson
2007-12-17 9:12 ` 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=acf852aa0712170112m758534bah1a6f8992023f4195@mail.gmail.com \
--to=dominik@science.uva.nl \
--cc=bzg@altern.org \
--cc=emacs-orgmode@gnu.org \
/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).