Browse Source

Merge branch 'maint'

Bastien Guerry 12 years ago
parent
commit
93c692ba27
2 changed files with 14 additions and 27 deletions
  1. 6 18
      lisp/org-agenda.el
  2. 8 9
      lisp/org.el

+ 6 - 18
lisp/org-agenda.el

@@ -8982,26 +8982,14 @@ The prefix arg is passed through to the command if possible."
 	  (setq cmd `(org-agenda-set-tags ,tag ,(if (eq action ?+) ''on ''off))))
 
 	 ((memq action '(?s ?d))
-	  (let* ((date
+	  (let* ((time
 		  (unless arg
-		    (or org-overriding-default-time
-			(and (org-read-date
-			      nil nil nil
-			      (if (eq action ?s) "(Re)Schedule to" "(Re)Set Deadline to"))
-			     (or (ignore-errors
-				   (org-time-string-to-time org-read-date-final-answer))
-				 (current-time))))))
-		 (date (format-time-string (car org-time-stamp-formats) date))
+		    (org-read-date
+		     nil nil nil
+		     (if (eq action ?s) "(Re)Schedule to" "(Re)Set Deadline to")
+		     org-overriding-default-time)))
 		 (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) ,date))
-			       (eval '(,c1 arg)))
-			   (if bound
-			       (fset 'read-string old)
-			     (fmakunbound 'read-string)))))))
+	    (setq cmd `(eval '(,c1 arg ,time)))))
 
 	 ((equal action ?S)
 	  (if (not (org-agenda-check-type nil 'agenda 'timeline 'todo))

+ 8 - 9
lisp/org.el

@@ -15633,15 +15633,14 @@ user."
       (setq ans "+0"))
 
     (when (setq delta (org-read-date-get-relative ans (current-time) org-def))
-      (unless (save-match-data (string-match org-plain-time-of-day-regexp ans))
-	(setq ans (replace-match "" t t ans)
-	      deltan (car delta)
-	      deltaw (nth 1 delta)
-	      deltadef (nth 2 delta))))
-
-    ;; Check if there is an iso week date in there
-    ;; If yes, store the info and postpone interpreting it until the rest
-    ;; of the parsing is done
+      (setq ans (replace-match "" t t ans)
+	    deltan (car delta)
+	    deltaw (nth 1 delta)
+	    deltadef (nth 2 delta)))
+
+    ;; Check if there is an iso week date in there.  If yes, store the
+    ;; info and postpone interpreting it until the rest of the parsing
+    ;; is done.
     (when (string-match "\\<\\(?:\\([0-9]+\\)-\\)?[wW]\\([0-9]\\{1,2\\}\\)\\(?:-\\([0-6]\\)\\)?\\([ \t]\\|$\\)" ans)
       (setq iso-year (if (match-end 1)
 			 (org-small-year-to-year