Fix bug in canceling clocks
commit4020e2a8c4fe654fd4de4803e5daf2c7dc40fc0f
authorCarsten Dominik <carsten.dominik@gmail.com>
Thu, 1 Oct 2009 18:01:01 +0000 (1 20:01 +0200)
committerCarsten Dominik <carsten.dominik@gmail.com>
Thu, 1 Oct 2009 18:01:01 +0000 (1 20:01 +0200)
tree8d4de00df180c80cb332e60a888f65cf84ce56e7
parent0b8457c835fa5ab40f8327578efdd9b3a374705f
Fix bug in canceling clocks

Peter Frings writes:

> Clocking in on any task (C-c C-x C-i) and cancelling afterwards (C-c C-x
> C-x) results in the following backtrace:
> ,----
> | Debugger entered--Lisp error: (wrong-type-argument markerp org-clock-marker)
> |   move-marker(org-clock-marker nil)
> |   org-clock-cancel()
> |   call-interactively(org-clock-cancel nil nil)
> `----
> Culprit are two erroneous quotes in front of org-clock-marker in org-clock-el. The patch (output
> of git diff -u on a clean checkout) fixes the problem:
>
> diff --git a/lisp/org-clock.el b/lisp/org-clock.el
> index e279898..91a4bcb 100644
> --- a/lisp/org-clock.el
> +++ b/lisp/org-clock.el
> @@ -818,8 +818,8 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set."
>     (set-buffer (marker-buffer org-clock-marker))
>     (goto-char org-clock-marker)
>     (delete-region (1- (point-at-bol)) (point-at-eol)))
> -  (move-marker 'org-clock-marker nil)
> -  (move-marker 'org-clock-hd-marker nil)
> +  (move-marker org-clock-marker nil)
> +  (move-marker org-clock-hd-marker nil)
>   (setq global-mode-string
>  (delq 'org-mode-line-string global-mode-string))
>   (force-mode-line-update)
lisp/ChangeLog
lisp/org-clock.el