From xemacs-m  Thu Dec 19 14:46:18 1996
Received: from plg.uwaterloo.ca (dmason@[129.97.140.10])
          by xemacs.cs.uiuc.edu (8.8.4/8.8.4) with ESMTP
	  id OAA10454 for <xemacs-beta@xemacs.org>; Thu, 19 Dec 1996 14:46:17 -0600 (CST)
Received: (from dmason@localhost) by plg.uwaterloo.ca (8.7.6/8.7.3) id PAA08206; Thu, 19 Dec 1996 15:46:17 -0500 (EST)
Date: Thu, 19 Dec 1996 15:46:17 -0500 (EST)
From: Dave Mason <dmason@plg.uwaterloo.ca>
Message-Id: <199612192046.PAA08206@plg.uwaterloo.ca>
To: xemacs-beta@xemacs.org
Subject: Need advice to write a time-spent package
X-Face: %Q_F^9R-:'3MM7eZ6@E.x@f\*bgatzGv-8d%I~L[p^.F)3QF{kq\UTsu|e#?)3FPwJNvPPB
 !s*He|-*M^p*~bh"Nywm5NLL\\Rl3r(hWHY*F:$/RdKV*bS";n&#\Ov@*=]mu\}6tP<lkW*7FT|:Dm
 9ejO^{)GHJdPQaa"C\<Ak`K27?328'V(u*|jAEZR9-z!o\^j:Cb&*tx_9\KbXD*2

I am a faculty member, and I do many different things a day, but I do
almost all of it from within emacs.  I would like to build an emacs
package that helps me figure out where all the time went!

As a first cut, I want to keep track of the total time spent active in
each unique ``default-directory''.  One way would be to, once a minute
append to a known file a line with whatever default-directory is for the
current-buffer.  That seems easy enough to do, and some optimizations
come to mind.  I could also just have a tick counter in each buffer
that I increment every so often when that buffer is active, and write
it out at appropriate times (like when the current directory changes
(like in shell buffers) or the buffer is destroyed).  I also want to
keep track of how much time I spend sending/receiving mail from
various people, so I'm going to use VM's auto-archive patterns to
figure it out.

Occasionally I *do* leave my emacs for a while - lunch, washroom,
teach a class - so I would like for this periodic process to notice
that there had been no events in a long time and prompt me on how to
record that time period.  Is there a ``time-of-last-event'' or
``time-since-last-event'', or some other way to get that information?

Any suggestions on better ways to do this?  I've hacked a fair amount
of elisp, so I don't need any more than pointers in the right
direction, but finding these things without pointers can be pretty
intimidating.

Lastly, of course I should verify that nobody has heard of such a
package already existing (or ask you to point me at it).  Would
anybody else use this?  Any suggestions on features you'd like?

Thanks	../Dave

