mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-12-28 10:56:57 +00:00
Agenda: Update agenda line after clocking out.
This was a request by Manish
This commit is contained in:
parent
4a3a486201
commit
c76aaf8037
@ -1,3 +1,9 @@
|
||||
2009-06-22 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-agenda.el (org-agenda-clock-out): Update line after clocking
|
||||
out.
|
||||
(org-agenda-highlight-todo): Fix bug with highlighting.
|
||||
|
||||
2009-06-21 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.el (org-set-font-lock-defaults): Adapt formatting to capture
|
||||
|
@ -4432,7 +4432,7 @@ HH:MM."
|
||||
(setq re (get-text-property (point) 'org-todo-regexp))
|
||||
(goto-char (+ (point) (or (get-text-property (point) 'prefix-length) 0)))
|
||||
(when (looking-at (concat "[ \t]*\\.*\\(" re "\\) +"))
|
||||
(add-text-properties (match-beginning 0) (match-end 0)
|
||||
(add-text-properties (match-beginning 0) (match-end 1)
|
||||
(list 'face (org-get-todo-face 1)))
|
||||
(let ((s (buffer-substring (match-beginning 1) (match-end 1))))
|
||||
(delete-region (match-beginning 1) (1- (match-end 0)))
|
||||
@ -6024,15 +6024,26 @@ The cursor may be at a date in the calendar, or in the Org agenda."
|
||||
(org-cycle-hide-drawers 'children)
|
||||
(org-clock-in arg)
|
||||
(setq newhead (org-get-heading)))
|
||||
(org-agenda-change-all-lines newhead hdmarker t)))))
|
||||
(org-agenda-change-all-lines newhead hdmarker)))))
|
||||
|
||||
(defun org-agenda-clock-out (&optional arg)
|
||||
"Stop the currently running clock."
|
||||
(interactive "P")
|
||||
(unless (marker-buffer org-clock-marker)
|
||||
(error "No running clock"))
|
||||
(org-with-remote-undo (marker-buffer org-clock-marker)
|
||||
(org-clock-out)))
|
||||
(let ((marker (make-marker)) newhead)
|
||||
(org-with-remote-undo (marker-buffer org-clock-marker)
|
||||
(with-current-buffer (marker-buffer org-clock-marker)
|
||||
(save-excursion
|
||||
(save-restriction
|
||||
(widen)
|
||||
(goto-char org-clock-marker)
|
||||
(org-back-to-heading t)
|
||||
(move-marker marker (point))
|
||||
(org-clock-out)
|
||||
(setq newhead (org-get-heading))))))
|
||||
(org-agenda-change-all-lines newhead marker)
|
||||
(move-marker marker nil)))
|
||||
|
||||
(defun org-agenda-clock-cancel (&optional arg)
|
||||
"Cancel the currently running clock."
|
||||
|
Loading…
Reference in New Issue
Block a user