unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Davis Herring" <herring@lanl.gov>
To: emacs-devel@gnu.org
Subject: Several small timeclock fixes
Date: Mon, 23 Apr 2007 12:19:08 -0700 (PDT)	[thread overview]
Message-ID: <34686.128.165.123.18.1177355948.squirrel@webmail.lanl.gov> (raw)

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.

             reply	other threads:[~2007-04-23 19:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-23 19:19 Davis Herring [this message]
2007-04-23 22:13 ` Several small timeclock fixes Chong Yidong
2007-06-08 19:53 ` Davis Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34686.128.165.123.18.1177355948.squirrel@webmail.lanl.gov \
    --to=herring@lanl.gov \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).