Browse Source

Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode

Carsten Dominik 14 years ago
parent
commit
98015f3748
1 changed files with 7 additions and 12 deletions
  1. 7 12
      lisp/org-agenda.el

+ 7 - 12
lisp/org-agenda.el

@@ -5355,7 +5355,7 @@ The modified list may contain inherited tags, and tags matched by
 		new)
 	  (put-text-property
 	   2 (length (car new)) 'face 'org-time-grid (car new))))
-      (when org-agenda-show-current-time-in-grid
+      (when (and todayp org-agenda-show-current-time-in-grid)
 	(push (org-format-agenda-item
 	       nil 
 	       org-agenda-current-time-string
@@ -7256,7 +7256,7 @@ be used to request time specification in the time stamp."
       (org-agenda-show-new-time marker org-last-changed-timestamp))
     (message "Time stamp changed to %s" org-last-changed-timestamp)))
 
-(defun org-agenda-schedule (arg)
+(defun org-agenda-schedule (arg &optional time)
   "Schedule the item at point.
 Arg is passed through to `org-schedule'."
   (interactive "P")
@@ -7274,11 +7274,11 @@ Arg is passed through to `org-schedule'."
       (with-current-buffer buffer
 	(widen)
 	(goto-char pos)
-	(setq ts (org-schedule arg)))
+	(setq ts (org-schedule arg time)))
       (org-agenda-show-new-time marker ts "S"))
     (message "Item scheduled for %s" ts)))
 
-(defun org-agenda-deadline (arg)
+(defun org-agenda-deadline (arg &optional time)
   "Schedule the item at point.
 Arg is passed through to `org-deadline'."
   (interactive "P")
@@ -7294,7 +7294,7 @@ Arg is passed through to `org-deadline'."
       (with-current-buffer buffer
 	(widen)
 	(goto-char pos)
-	(setq ts (org-deadline arg)))
+	(setq ts (org-deadline arg time)))
       (org-agenda-show-new-time marker ts "D"))
 	(message "Deadline for this item set to %s" ts)))
 
@@ -7887,13 +7887,7 @@ The prefix arg is passed through to the command if possible."
 	     (c1 (if (eq action ?s) 'org-agenda-schedule 'org-agenda-deadline)))
 	(setq cmd `(let* ((bound (fboundp 'read-string))
 			  (old (and bound (symbol-function 'read-string))))
-		     (unwind-protect
-			 (progn
-			   (fset 'read-string (lambda (&rest ignore) ,ans))
-			   (eval '(,c1 arg)))
-		       (if bound
-			   (fset 'read-string old)
-			 (fmakunbound 'read-string)))))))
+		     (eval '(,c1 arg nil ,date))))))
 
      ((eq action '?S)
       (let ((days (read-number
@@ -7915,6 +7909,7 @@ The prefix arg is passed through to the command if possible."
 			 (incf day-of-week)
 			 (if (= day-of-week 7)
 			     (setq day-of-week 0)))))
+		 (org-agenda-schedule nil (days-to-time (org-today)))
 		 (org-agenda-date-later distance)))))
 
      (t (error "Invalid bulk action")))