all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Several small timeclock fixes
@ 2007-04-23 19:19 Davis Herring
  2007-04-23 22:13 ` Chong Yidong
  2007-06-08 19:53 ` Davis Herring
  0 siblings, 2 replies; 3+ messages in thread
From: Davis Herring @ 2007-04-23 19:19 UTC (permalink / raw)
  To: emacs-devel

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  <herring@lanl.gov>

	* 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-08 19:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-23 19:19 Several small timeclock fixes Davis Herring
2007-04-23 22:13 ` Chong Yidong
2007-06-08 19:53 ` Davis Herring

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.