From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Davis Herring" Newsgroups: gmane.emacs.devel Subject: Several small timeclock fixes Date: Mon, 23 Apr 2007 12:19:08 -0700 (PDT) Message-ID: <34686.128.165.123.18.1177355948.squirrel@webmail.lanl.gov> Reply-To: herring@lanl.gov NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1177355989 29194 80.91.229.12 (23 Apr 2007 19:19:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 23 Apr 2007 19:19:49 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 23 21:19:43 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Hg44c-0005ao-1b for ged-emacs-devel@m.gmane.org; Mon, 23 Apr 2007 21:19:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hg4A2-0003M7-EB for ged-emacs-devel@m.gmane.org; Mon, 23 Apr 2007 15:25:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hg49a-0003Dy-U6 for emacs-devel@gnu.org; Mon, 23 Apr 2007 15:24:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hg49Z-0003D9-73 for emacs-devel@gnu.org; Mon, 23 Apr 2007 15:24:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hg49Y-0003D3-Up for emacs-devel@gnu.org; Mon, 23 Apr 2007 15:24:48 -0400 Original-Received: from mailwasher.lanl.gov ([192.65.95.54] helo=mailwasher-b.lanl.gov) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hg447-00053a-NG for emacs-devel@gnu.org; Mon, 23 Apr 2007 15:19:12 -0400 Original-Received: from mailrelay1.lanl.gov (mailrelay1.lanl.gov [128.165.4.101]) by mailwasher-b.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id l3NJJ9hR020746 for ; Mon, 23 Apr 2007 13:19:09 -0600 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay1.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id l3NJJ8hT007510 for ; Mon, 23 Apr 2007 13:19:09 -0600 Original-Received: from webmail1.lanl.gov (localhost.localdomain [127.0.0.1]) by webmail1.lanl.gov (8.12.11.20060308/8.12.11) with ESMTP id l3NJJ8QT019054 for ; Mon, 23 Apr 2007 13:19:08 -0600 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id l3NJJ89a019052; Mon, 23 Apr 2007 12:19:08 -0700 X-Authentication-Warning: webmail1.lanl.gov: apache set sender to herring@lanl.gov using -f Original-Received: from 128.165.123.18 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Mon, 23 Apr 2007 12:19:08 -0700 (PDT) User-Agent: SquirrelMail/1.4.8-4.el3.2lanl X-Priority: 3 (Normal) Importance: Normal X-PMX-Version: 4.7.1.128075 X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:69869 Archived-At: 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 * 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.