소스 검색

Fixed bug in the clock-in implementation fro the agenda.

This bug was reported by Raimar Finken.
Carsten Dominik 17 년 전
부모
커밋
097782f7e6
2개의 변경된 파일14개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 0
      lisp/ChangeLog
  2. 10 2
      lisp/org-agenda.el

+ 4 - 0
lisp/ChangeLog

@@ -1,5 +1,9 @@
 2008-06-12  Carsten Dominik  <dominik@science.uva.nl>
 
+	* org-agenda.el (org-agenda-clock-in): Fixed bug in the
+	interaction between clocking-in from the agenda, and  automatic
+	task state switching.
+
 	* org-macs.el (org-with-point-at): Bug fix in macro defintion.
 
 	* org.el (org-beginning-of-line, org-end-of-line): Make sure the

+ 10 - 2
lisp/org-agenda.el

@@ -4930,12 +4930,20 @@ be used to request time specification in the time stamp."
       (org-clock-in arg)
     (let* ((marker (or (get-text-property (point) 'org-marker)
 		       (org-agenda-error)))
-	   (pos (marker-position marker)))
+	   (hdmarker (or (get-text-property (point) 'org-hd-marker)
+			 marker))
+	   (pos (marker-position marker))
+	   newhead)
       (org-with-remote-undo (marker-buffer marker)
         (with-current-buffer (marker-buffer marker)
 	  (widen)
 	  (goto-char pos)
-	  (org-clock-in arg))))))
+	  (org-show-context 'agenda)
+	  (org-show-entry)
+	  (org-cycle-hide-drawers 'children)
+	  (org-clock-in arg)
+	  (setq newhead (org-get-heading)))
+	(org-agenda-change-all-lines newhead hdmarker t)))))
 
 (defun org-agenda-clock-out (&optional arg)
   "Stop the currently running clock."