diff options
author | Bastien Guerry <bzg@altern.org> | 2011-12-11 17:52:10 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2011-12-11 17:52:10 +0100 |
commit | cd447fa11d2bb76982d42427b1ef7344e7f81d6c (patch) | |
tree | 2a3313965d3bd6faca1f7c99a1f7364a3be80bd6 | |
parent | b67b6b7844f619f40a79dff69e700f24ac8d6ac9 (diff) | |
download | org-mode-cd447fa11d2bb76982d42427b1ef7344e7f81d6c.tar.gz |
Make `org-todo-yesterday' call `org-agenda-todo-yesterday' if necessary.
* org.el (org-todo-yesterday): When called from the agenda,
use `org-agenda-todo-yesterday' instead.
-rw-r--r-- | lisp/org.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/org.el b/lisp/org.el index 01e8cd6..a505b34 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -11143,12 +11143,14 @@ nil or a string to be used for the todo mark." ) ct1)) (defun org-todo-yesterday (&optional arg) - "Like `org-todo' but the time of change will be 23:59 of yesterday" + "Like `org-todo' but the time of change will be 23:59 of yesterday." (interactive "P") - (let* ((hour (third (decode-time - (org-current-time)))) - (org-extend-today-until (1+ hour))) - (org-todo arg))) + (if (eq major-mode 'org-agenda-mode) + (apply 'org-agenda-todo-yesterday arg) + (let* ((hour (third (decode-time + (org-current-time)))) + (org-extend-today-until (1+ hour))) + (org-todo arg)))) (defun org-todo (&optional arg) "Change the TODO state of an item. |