From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Including current time in agenda Date: Mon, 6 Dec 2010 14:00:33 +0100 Message-ID: <64F9ABE6-CFCC-41F7-98AC-B9AF6F2C5D31@gmail.com> References: <8739qbjf7m.fsf@pinto.chemeng.ucl.ac.uk> <87pqtfhzn2.fsf@pinto.chemeng.ucl.ac.uk> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=49973 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PPagb-0002XT-B1 for emacs-orgmode@gnu.org; Mon, 06 Dec 2010 08:01:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PPagR-0001Rl-Cl for emacs-orgmode@gnu.org; Mon, 06 Dec 2010 08:00:57 -0500 Received: from mail-fx0-f41.google.com ([209.85.161.41]:59536) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PPagR-0001Ra-25 for emacs-orgmode@gnu.org; Mon, 06 Dec 2010 08:00:47 -0500 Received: by fxm13 with SMTP id 13so10285210fxm.0 for ; Mon, 06 Dec 2010 05:00:46 -0800 (PST) In-Reply-To: <87pqtfhzn2.fsf@pinto.chemeng.ucl.ac.uk> 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 On Dec 6, 2010, at 1:08 PM, Eric S Fraga wrote: > suvayu ali writes: > >> Hi Eric, >> >> On Mon, Dec 6, 2010 at 12:47 PM, Eric S Fraga >> wrote: > > [...] > >>> However, it would be nice if the agenda view could highlight the >>> current >>> time, much as it is possible to highlight the current day in a week >>> view, for instance... so this could be a good "feature request"! >>> I have >>> no idea how hard it would be to implement, mind you... >>> >> >> Would you have any idea where I could look to get started with >> implementing something like this? > > Sorry, not a clue. All I can suggest is you look at org-agenda.el. Take a look at the function org-agenda-add-time-grid-maybe. There is a loop over the gridtimes. Just before the (while (setq time (pop gridtimes)) you could add something like (setq time (format-time-string "%H%M")) (push (org-format-agenda-item nil "--- now --- now --- now --- now --- now --- " "" nil (concat (substring time 0 -2) ":" (substring time -2))) new) (put-text-property 2 (length (car new)) 'face 'org-time-grid (car new)) You may still play with the string to be used (here "now --- now --- ..."), you might want to add a different face, and the whole thing should be configurable with some variable - plenty of work and testing left for you :) - Carsten