wakatime / wakatime-mode

Emacs plugin for automatic time tracking and metrics generated from your programming activity.
https://wakatime.com/emacs
267 stars 41 forks source link

Support for reading email #34

Open To1ne opened 6 years ago

To1ne commented 6 years ago

I read my email in Emacs using Gnus, and I was wondering if there is a way to file mail activity under a "Email" project?

AFAICS, (buffer-file-name (current-buffer)) is passed to the cli tool, and that will probably determine the project based on that. But that s-exp evals to nil when I'm inside an email buffer (e.g. gnus-summary-mode or gnus-article-mode).

Maybe we can fix this by adding a buffer local variable wakatime-current-project (or something like that) that I can set in my mode hooks and will be passed to the cli tool.

alanhamlett commented 6 years ago

We can use these GNUS hooks then instead of sending the file to wakatime cli we can send these commands:

--entity GNUS
--type app
To1ne commented 6 years ago

Well, that was basically my idea too. But how can I plug that in into wakatime.el?