Browse Source

org-todo-yesterday: Ignore `org-use-effective-time'

* lisp/org.el (org-todo-yesterday):
* lisp/org-agenda.el (org-agenda-todo-yesterday): Ignore global
`org-use-effective-time' value.

Otherwise, if `org-use-effective-time' being nil,
`org-extend-today-until' will not be considered, resulting in the
current time being used instead of 23:59 yesterday.

Reported-by: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/93224>
Kyle Meyer 5 years ago
parent
commit
5d25e6e68e
2 changed files with 4 additions and 2 deletions
  1. 2 1
      lisp/org-agenda.el
  2. 2 1
      lisp/org.el

+ 2 - 1
lisp/org-agenda.el

@@ -10143,7 +10143,8 @@ to override `appt-message-warning-time'."
 (defun org-agenda-todo-yesterday (&optional arg)
   "Like `org-agenda-todo' but the time of change will be 23:59 of yesterday."
   (interactive "P")
-  (let* ((hour (third (decode-time
+  (let* ((org-use-effective-time t)
+	 (hour (third (decode-time
                        (org-current-time))))
          (org-extend-today-until (1+ hour)))
     (org-agenda-todo arg)))

+ 2 - 1
lisp/org.el

@@ -12469,7 +12469,8 @@ nil or a string to be used for the todo mark." )
   (interactive "P")
   (if (eq major-mode 'org-agenda-mode)
       (apply 'org-agenda-todo-yesterday arg)
-    (let* ((hour (third (decode-time
+    (let* ((org-use-effective-time t)
+	   (hour (third (decode-time
 			 (org-current-time))))
 	   (org-extend-today-until (1+ hour)))
       (org-todo arg))))