From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mikael Fornius Subject: [PATCH] (org-habit-build-graph): Help-echo date when mouse is over stars. Date: Tue, 4 May 2010 12:35:47 +0200 Message-ID: <1272969347-5431-1-git-send-email-mfo@abc.se> Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O9FQG-0004Hs-DB for emacs-orgmode@gnu.org; Tue, 04 May 2010 06:32:16 -0400 Received: from [140.186.70.92] (port=59150 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9FQE-0004HS-Ri for emacs-orgmode@gnu.org; Tue, 04 May 2010 06:32:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O9FQA-0008Q2-7p for emacs-orgmode@gnu.org; Tue, 04 May 2010 06:32:14 -0400 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: emacs-orgmode@gnu.org Cc: Mikael Fornius , johnw@gnu.org Hi John, Carsten and fellow orgs. This patch introduces a small new feature in org-habit I have wanted for a while: When mouse is over a done-star in the habit-graph I get a help-echo with the date. This is useful because I use many preceeding days and there is no easy way (that I know of) to find the done-dates when viewing the graph. Often I ask myself 'hmm when did I do this habit lately' when I am visually evaluating the habit graph and I get stuck, annoying :) I think this is a small and tasty feature so feel free to use it in org-habit if you like it. --- lisp/ChangeLog | 5 +++++ lisp/org-habit.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7f1a507..a168d73 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-05-04 Mikael Fornius + + * org-habit.el (org-habit-build-graph): Help-echo date when + mouse is over stars. + 2010-05-02 Dan Davison * org-src.el (org-edit-src-code): allow-write-back-p had diff --git a/lisp/org-habit.el b/lisp/org-habit.el index bb8773e..a3a4d19 100644 --- a/lisp/org-habit.el +++ b/lisp/org-habit.el @@ -280,9 +280,11 @@ current time." donep))) markedp face) (if donep - (progn + (let ((done-time (time-add starting (days-to-time (- start (time-to-days starting)))))) (aset graph index ?*) (setq markedp t) + (put-text-property index (1+ index) 'help-echo + (format-time-string (org-time-stamp-format) done-time) graph) (while (and done-dates (= start (car done-dates))) (setq last-done-date (car done-dates) -- 1.7.1