瀏覽代碼

Fix bulk scattering command

* lisp/org-agenda.el (org-agenda-bulk-action): Fix bug caused by
`days-to-time, converting relative to 1 BC, while the code assumed it
would return a time relative to 1970.

For more information, see

http://thread.gmane.org/gmane.emacs.orgmode/42531
Carsten Dominik 14 年之前
父節點
當前提交
36dd7e2150
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      lisp/org-agenda.el

+ 5 - 3
lisp/org-agenda.el

@@ -8199,9 +8199,11 @@ The prefix arg is passed through to the command if possible."
 			       (setq day-of-week 0)))))
 		   ;; silently fail when try to replan a sexp entry
 		   (condition-case nil
-		       (org-agenda-schedule nil
-					    (days-to-time
-					     (+ (org-today) distance)))
+		       (let* ((date (calendar-gregorian-from-absolute
+				     (+ (org-today) distance)))
+			      (time (encode-time 0 0 0 (nth 1 date) (nth 0 date)
+						 (nth 2 date))))
+			 (org-agenda-schedule nil time))
 		     (error nil)))))))
 
      ((equal action ?f)