emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Eric S Fraga <e.fraga@ucl.ac.uk>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Including current time in agenda
Date: Mon, 6 Dec 2010 14:00:33 +0100	[thread overview]
Message-ID: <64F9ABE6-CFCC-41F7-98AC-B9AF6F2C5D31@gmail.com> (raw)
In-Reply-To: <87pqtfhzn2.fsf@pinto.chemeng.ucl.ac.uk>


On Dec 6, 2010, at 1:08 PM, Eric S Fraga wrote:

> suvayu ali <fatkasuvayu+linux@gmail.com> writes:
>
>> Hi Eric,
>>
>> On Mon, Dec 6, 2010 at 12:47 PM, Eric S Fraga <e.fraga@ucl.ac.uk>  
>> 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

  parent reply	other threads:[~2010-12-06 13:01 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-06  6:49 Including current time in agenda suvayu ali
2010-12-06 11:47 ` Eric S Fraga
2010-12-06 11:55   ` suvayu ali
2010-12-06 12:08     ` Eric S Fraga
2010-12-06 12:27       ` suvayu ali
2010-12-06 13:00       ` Carsten Dominik [this message]
2010-12-06 13:10         ` suvayu ali
2010-12-06 13:38 ` Julien Danjou
2010-12-06 14:03   ` Carsten Dominik
2010-12-06 14:30     ` Suvayu Ali
2010-12-06 14:45       ` Carsten Dominik
2010-12-06 14:53         ` Suvayu Ali
2010-12-06 14:56           ` Carsten Dominik
2010-12-06 14:59       ` Rémi Vanicat
2010-12-06 15:10         ` suvayu ali
2010-12-06 15:13       ` Julien Danjou
2010-12-06 15:28         ` Suvayu Ali
2010-12-06 15:39   ` Matt Lundin
2010-12-12  8:30     ` Carsten Dominik
2010-12-12 17:54       ` Eric S Fraga
2010-12-12 21:31         ` Matt Lundin
2011-01-07 19:31           ` Erik Butz
2011-01-07 23:27             ` suvayu ali
2011-01-07 23:46               ` Erik Butz
2011-01-08  0:04                 ` suvayu ali
2011-01-08 14:46                   ` Erik Butz
2010-12-12 18:19       ` suvayu ali
2010-12-06 19:27   ` Eric S Fraga
2010-12-06 22:34     ` suvayu ali
2010-12-08 23:46       ` [PATCH] sexp can set its face (was: Including current time in agenda) Łukasz Stelmach
2010-12-12  7:44         ` Carsten Dominik
2010-12-13  0:14         ` suvayu ali

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=64F9ABE6-CFCC-41F7-98AC-B9AF6F2C5D31@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).