소스 검색

org-agenda.el (org-agenda-bulk-action): Use the date at point

* org-agenda.el (org-agenda-bulk-action): Possibly use the day
at point to reset the scheduled or deadline cookie.  On date
headers, use it without prompting the user.  On an item, use
the item's date as the default prompt for `org-read-date'.
Bastien Guerry 13 년 전
부모
커밋
bda6404b32
1개의 변경된 파일9개의 추가작업 그리고 3개의 파일을 삭제
  1. 9 3
      lisp/org-agenda.el

+ 9 - 3
lisp/org-agenda.el

@@ -8903,6 +8903,9 @@ The prefix arg is passed through to the command if possible."
       (let* ((action (read-char-exclusive))
 	     (org-log-refile (if org-log-refile 'time nil))
 	     (entries (reverse org-agenda-bulk-marked-entries))
+	     (org-overriding-default-time
+	      (if (get-text-property (point) 'org-agenda-date-header)
+		  (org-get-cursor-date)))
 	     redo-at-end
 	     cmd rfloc state e tag pos (cnt 0) (cntskip 0))
 	(cond
@@ -8953,9 +8956,12 @@ The prefix arg is passed through to the command if possible."
 
 	 ((memq action '(?s ?d))
 	  (let* ((date (unless arg
-			 (org-read-date
-			  nil nil nil
-			  (if (eq action ?s) "(Re)Schedule to" "Set Deadline to"))))
+			 (or org-overriding-default-time
+			     (org-read-date
+			      nil nil nil
+			      (if (eq action ?s) "(Re)Schedule to" "(Re)Set Deadline to")
+			      nil (format-time-string (car org-time-stamp-formats)
+						      (org-get-cursor-date))))))
 		 (ans (if arg nil org-read-date-final-answer))
 		 (c1 (if (eq action ?s) 'org-agenda-schedule 'org-agenda-deadline)))
 	    (setq cmd `(let* ((bound (fboundp 'read-string))