From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viktor Rosenfeld Subject: Re: PATCH: Habit consistency always show DONE days green option Date: Mon, 6 May 2013 22:10:27 +0200 Message-ID: <20130506201027.GA2320@kenny.fritz.box> References: <877gjcp3ma.wl%max@openchat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZRk4-0002ha-R7 for emacs-orgmode@gnu.org; Mon, 06 May 2013 16:10:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZRk3-0002cC-Fb for emacs-orgmode@gnu.org; Mon, 06 May 2013 16:10:36 -0400 Received: from mail-bk0-x232.google.com ([2a00:1450:4008:c01::232]:45659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZRk3-0002bx-9V for emacs-orgmode@gnu.org; Mon, 06 May 2013 16:10:35 -0400 Received: by mail-bk0-f50.google.com with SMTP id ik5so1741725bkc.23 for ; Mon, 06 May 2013 13:10:34 -0700 (PDT) Content-Disposition: inline In-Reply-To: <877gjcp3ma.wl%max@openchat.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Max Mikhanosha Cc: emacs-orgmode@gnu.org Love this patch! Much more pleasing to the eye. Cheers, Viktor Max Mikhanosha wrote: > I had always disliked how if you miss a habit deadline and then go on > a several day streak, first day still show up red. Makes it hard to > visually see "green streaks" > > Following patch adds a new variable `org-habit-show-done-always-green' > to fix that. It defaults to off, if enough people like it we can > make it new default. > > To illustrate the difference in display, try to count number of two > day streaks in below screen-shots. > > Current display: > > http://i.imgur.com/HlyXE2o.png > > With new option: > > http://i.imgur.com/3ZmImkP.png > > Note that no information is lost, you can still figure out if streak > started after missing a deadline, by color of the previous day. > > Regards, > Max > > From 5c7f9b63b6021631b19b883760340a18024e6344 Mon Sep 17 00:00:00 2001 > From: Max Mikhanosha > Date: Mon, 6 May 2013 09:26:10 -0400 > Subject: [PATCH] Add option to always show DONE days as green on consistency > graph. It can be enabled by setting > `org-habit-show-done-alwyays-green' variable to t. > > * lisp/org-habit.el (org-habit-get-faces): Add show done days green option > --- > lisp/org-habit.el | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/lisp/org-habit.el b/lisp/org-habit.el > index 8465ba4..0899f45 100644 > --- a/lisp/org-habit.el > +++ b/lisp/org-habit.el > @@ -85,6 +85,12 @@ (defcustom org-habit-completed-glyph ?* > :version "24.1" > :type 'character) > > +(defcustom org-habit-show-done-always-green nil > + "If non-nil, a DONE day will always be green in consistency > +graph, even if it was done after deadline" > + :group 'org-habit > + :type 'boolean) > + > (defface org-habit-clear-face > '((((background light)) (:background "#8270f9")) > (((background dark)) (:background "blue"))) > @@ -272,8 +278,9 @@ (defun org-habit-get-faces (habit &optional now-days scheduled-days donep) > (if donep > '(org-habit-ready-face . org-habit-ready-future-face) > '(org-habit-alert-face . org-habit-alert-future-face))) > - (t > - '(org-habit-overdue-face . org-habit-overdue-future-face))))) > + ((and org-habit-show-done-always-green donep) > + '(org-habit-ready-face . org-habit-ready-future-face)) > + (t '(org-habit-overdue-face . org-habit-overdue-future-face))))) > > (defun org-habit-build-graph (habit starting current ending) > "Build a graph for the given HABIT, from STARTING to ENDING. > -- > 1.7.11.rc0.100.g5498c5f > > >