unofficial mirror of emacs-devel@gnu.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

* Re: Several small timeclock fixes
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Chong Yidong @ 2007-04-23 22:13 UTC (permalink / raw)
  To: herring; +Cc: emacs-devel

"Davis Herring" <herring@lanl.gov> writes:

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

If it's waited this long, it can surely wait for Emacs 22.2.

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

* Re: Several small timeclock fixes
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Davis Herring @ 2007-06-08 19:53 UTC (permalink / raw)
  To: emacs-devel

I wrote this when supplying (or rather forgetting to supply; I sent it
later) a complex patch for timeclock.el:

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

That ChangeLog entry is incomplete, for the simple reason that I included
(in the patch that was eventually installed) a convenience function of
mine (`timeclock-make-hours-explicit') that I don't recall really meaning
to include.

There's nothing wrong with it, and it's in Emacs 22.1, so it should
probably stay.  But it should at the very least get a ChangeLog mention
(obviously just "New function."), and perhaps a mention in (emacs)Time
Intervals or so.

What more do I need to contribute for this, and (while on the subject)
could it get a look-over to make sure that it is only "extra" and not
broken?

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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).