From mboxrd@z Thu Jan 1 00:00:00 1970 From: suvayu ali Subject: Re: Including current time in agenda Date: Mon, 6 Dec 2010 14:10:37 +0100 Message-ID: References: <8739qbjf7m.fsf@pinto.chemeng.ucl.ac.uk> <87pqtfhzn2.fsf@pinto.chemeng.ucl.ac.uk> <64F9ABE6-CFCC-41F7-98AC-B9AF6F2C5D31@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=52713 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PPaqJ-0006PV-FW for emacs-orgmode@gnu.org; Mon, 06 Dec 2010 08:11:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PPaqI-0004Vb-50 for emacs-orgmode@gnu.org; Mon, 06 Dec 2010 08:10:59 -0500 Received: from mail-yw0-f41.google.com ([209.85.213.41]:46134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PPaqI-0004VP-1U for emacs-orgmode@gnu.org; Mon, 06 Dec 2010 08:10:58 -0500 Received: by ywj3 with SMTP id 3so521174ywj.0 for ; Mon, 06 Dec 2010 05:10:57 -0800 (PST) In-Reply-To: <64F9ABE6-CFCC-41F7-98AC-B9AF6F2C5D31@gmail.com> 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: Carsten Dominik Cc: org-mode mailing list On Mon, Dec 6, 2010 at 2:00 PM, Carsten Dominik wrote: > > 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 curre= nt >>>> 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"! =A0I = 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. =A0All 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. =A0Just before the > > =A0 (while (setq time (pop gridtimes)) > > you could add something like > > =A0 =A0 =A0 =A0 =A0(setq time (format-time-string "%H%M")) > =A0 =A0 =A0 =A0 =A0(push (org-format-agenda-item > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 nil "--- now --- now --- now --- now --- = now --- " "" nil > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (concat (substring time 0 -2) ":" (substr= ing time -2))) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0new) > =A0 =A0 =A0 =A0 =A0(put-text-property > =A0 =A0 =A0 =A0 =A0 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 :) > Thanks a lot Carsten! I'll post back to the list in case I succeed or if I get stuck. :) > - Carsten > > --=20 Suvayu Open source is the future. It sets us free.