emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Several small timeclock fixes


From: Davis Herring
Subject: Several small timeclock fixes
Date: Mon, 23 Apr 2007 12:19:08 -0700 (PDT)
User-agent: SquirrelMail/1.4.8-4.el3.2lanl

This is a large patch for the day on which the branch is (hopefully) cut,
so let me explain.  These are just fixes my copy of timeclock.el has
accumulated over a couple of years, which I never found the time (ha) to
submit.  Each hunk, except the last, is entirely independent of the
others; the last and third from last are one fix together.  In order, the
hunks:

1. Update the file's version number (obviously optional)
2. Make two suggestions instead of one when `timeclock-modeline-display'
doesn't work (just a string changed)
3. Fix the logging of workday lengths chosen programmatically or via
`timeclock-get-workday-function' (that feature is useless as it stands)
4. Don't kill any buffer that's already visiting the log file
 - This hunk is almost entirely indentation adjustment
 - find-file's warnings are suppressed
 - A redundant check of '(and project (stringp project) ...)' was reduced
to '(and (stringp project) ...)'
 - `timeclock-event-hook' is now run after the buffer is killed, if it's
to be killed; at the moment, I don't remember any particular reason for
moving it except to have it called, as most such things are, after all
the work is done.  It could be moved back without affecting anything
adversely.
5 & 7.  This function has always computed an arithmetic mean (commonly
called just "mean"), not a geometric mean.  Name, documentation, and uses
changed appropriately; there are no other uses of this function in Emacs.
6. Make `timeclock-generate-report' take HTML-P as a prefix argument (just
"(interactive)" -> "(interactive "P")")

Please apply whichever of these has a sufficiently large product of
necessity and triviality; my own ordering for that metric is 3 (a real
bug), 5/7 (an embarrassing misnomer), 4 (kills buffers wrongly), 2
(informative), 6 (convenience), and finally 1 (just to distinguish the
file).

A single ChangeLog entry for all these changes:

2007-04-23  Davis Herring  <address@hidden>

        * calendar/timeclock.el: Update version number.
        (timeclock-modeline-display): Mention timeclock-use-display-time
        in explanatory message.
        (timeclock-in): Fix non-interactive workday specifications.
        (timeclock-log): Don't kill the log buffer if it already existed.
        Suppress warnings when finding the log.  Don't check for a nil
        project twice.  Run hooks after killing the buffer (if
        applicable).
        (timeclock-geometric-mean): Rename to `timeclock-mean' (it never
        was geometric).  All uses changed.
        (timeclock-generate-report): Support prefix argument.

Thanks,
Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]