On Wed, 2 Jan 2002, Charles Jie wrote:

> Is it possible to have mutt record the time I use to read or write a
> mail? I hope to know how much time I spend in a folder (a kind of info).
>
> Further, I want a timer to alert me when I'm going to run out of the
> pre-set time for reading or writing a mail.
>
> Are the solution there? Or quick solution available?

I don't know of any existing solutions, but I can tell you where to start,
assuming you can program it yourself.

In .muttrc, you can ``set editor="some command"''. Change that to run a
wrapper script that records the current time, starts your text editor
(e.g. pico or vi) in the background, and then keeps monitoring your
editor's PID to see if it's still running. If you take too long, then it
can write to /dev/yourterminal to tell you that you're taking too long.
When it sees that the PID has stopped running, it knows you're finished
and it can log the time that you tok.

The above method will enable you to see how long it takes you to write a
mail, but there's a bit of programming that you'd have to do.

As for seeing how long it takes you to read a mail, I think that you can
set mutt to use a different program to read a mail; if you do that, you'd
be able to use the same method as above. I'm not sure if you can still use
the mutt pager and be able to log how long it takes.

Of course, you can do anything if you patch mutt's source code, but it
will probably be more difficult since you have to write in C instead of
perl, and you have to figure out how mutt's source code works first.

Reply via email to