On 02/08/2005 20:59, Guy Berliner wrote: > Is there a way to determine at a glance whether one is "clocked-in" to a > task when using planner-timeclock, and if so, which one? Ideally, it > would be something that would appear in the modeline, say.
I use this: (add-hook 'timeclock-in-hook 'timeclock-update-modeline) (add-hook 'timeclock-out-hook 'timeclock-update-modeline) I also redefine timeclock-update-modeline as follows, to just give me the plan page: (defun timeclock-update-modeline () "Update the `timeclock-mode-string' displayed in the modeline to include the current project and the current amount of time spent in that project." (interactive) (let* ((time-string (timeclock-seconds-to-string (timeclock-last-period))) (job-string (nth 2 timeclock-last-event)) (match (when job-string (string-match "\\(.*?\\):" job-string))) (project (when match (substring job-string (match-beginning 1) (match-end 1))))) (setq timeclock-mode-string (if project (concat " [" project ": " time-string "]") (concat " [Clocked out]")))) (force-mode-line-update)) HTH Chris -- Chris Parsons [EMAIL PROTECTED]
signature.asc
Description: OpenPGP digital signature
_______________________________________________ emacs-wiki-discuss mailing list emacs-wiki-discuss@nongnu.org http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss