emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
   commit cd447fa11d2bb76982d42427b1ef7344e7f81d6c (patch)
   parent b67b6b784 New command: `org-table-transpose-table-at-point'.
     tree 2a3313965d3bd6faca1f7c99a1f7364a3be80bd6
   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

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.
---
 lisp/org.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 01e8cd6b2..a505b3421 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.


glossary
--------
Commit objects reference one tree, and zero or more parents.

Single parent commits can typically generate a patch in
unified diff format via `git format-patch'.

Multiple parents means the commit is a merge.

Root commits have no ancestor.  Note that it is
possible to have multiple root commits when merging independent histories.

Every commit references one top-level tree object.

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).