[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error while executing timeclock-out function
From: |
Eli Zaretskii |
Subject: |
Re: Error while executing timeclock-out function |
Date: |
Sat, 03 Nov 2001 17:43:07 +0200 |
> From: Niranjan Harishchandra Rao <nrao@usinteractive.com>
> Date: 02 Nov 2001 16:18:42 -0800
>
> While reading emacs info I came across the reference of
> timeclock. While trying it I found out that function timeclock-out
> generates error
>
> timeclock-out: Wrong type argument: number-or-marker-p, nil
Thanks. I believe this happens because you didn't invoke
timeclock-in before invoke timeclock-out. Please see if the change
below causes a more clear error message to be displayed.
Index: lisp/calendar/timeclock.el
===================================================================
RCS file: /cvs/emacs/lisp/calendar/timeclock.el,v
retrieving revision 1.17
diff -c -r1.17 timeclock.el
*** lisp/calendar/timeclock.el 2001/05/10 02:46:38 1.17
--- lisp/calendar/timeclock.el 2001/11/03 15:40:27
***************
*** 370,375 ****
--- 370,377 ----
interactively -- call the function `timeclock-get-reason-function' to
discover the reason."
(interactive "P")
+ (or timeclock-last-event
+ (error "You haven't clocked in!"))
(if (equal (downcase (car timeclock-last-event)) "o")
(error "You've already clocked out!")
(timeclock-log