From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Re: Including current time in agenda Date: Sun, 12 Dec 2010 16:31:06 -0500 Message-ID: <87zksa3ch1.fsf@fastmail.fm> References: <87mxoi52sp.fsf@fastmail.fm> <9DA94FAE-E0CA-46CE-9F74-C1F462825A71@gmail.com> <871v5m27y4.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=33884 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PRtVd-0002qE-HA for emacs-orgmode@gnu.org; Sun, 12 Dec 2010 16:31:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PRtVc-0004IB-Am for emacs-orgmode@gnu.org; Sun, 12 Dec 2010 16:31:09 -0500 Received: from out3.smtp.messagingengine.com ([66.111.4.27]:51597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PRtVc-0004I7-63 for emacs-orgmode@gnu.org; Sun, 12 Dec 2010 16:31:08 -0500 In-Reply-To: <871v5m27y4.fsf@ucl.ac.uk> (Eric S. Fraga's message of "Sun, 12 Dec 2010 17:54:11 +0000") 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: Eric S Fraga Cc: org-mode mailing list , Carsten Dominik Eric S Fraga writes: > Carsten Dominik writes: > > [...] > >> I agree that this is creative and great. >> >> However having the current time in the time grid is so useful that >> I have now made it the default, no diary sexp needed. > > Thanks for this, Carsten. I like being able to change the face easily > (in my case, I simply set it to underline with no agenda string to keep > a minimalist approach). > > However, there is one problem (?): if I change my view to another day > (using, say, "j" in the agenda day view), I get the "current time" > highlighted for that other day and obviously the current time makes no > sense other than for "today", I would argue. The patch below fixes the issue for me. Best, Matt --8<---------------cut here---------------start------------->8--- diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index fb26ee9..67c8d89 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -5353,7 +5353,7 @@ The modified list may contain inherited tags, and tags matched by new) (put-text-property 2 (length (car new)) 'face 'org-time-grid (car new)))) - (when org-agenda-show-current-time-in-grid + (when (and todayp org-agenda-show-current-time-in-grid) (push (org-format-agenda-item nil org-agenda-current-time-string --8<---------------cut here---------------end--------------->8---