Browse Source

Improve documentation about prefix args to scheduling/deadline cmds in agenda

Carsten Dominik 15 years ago
parent
commit
cab009b78e
4 changed files with 31 additions and 13 deletions
  1. 5 0
      doc/ChangeLog
  2. 5 3
      doc/org.texi
  3. 7 0
      lisp/ChangeLog
  4. 14 10
      lisp/org-agenda.el

+ 5 - 0
doc/ChangeLog

@@ -1,3 +1,8 @@
+2010-01-14  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org.texi (Agenda commands): Add information about prefix args to
+	scheduling and deadline commands.
+
 2010-01-05  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org.texi (Search view): Point to the docstring of

+ 5 - 3
doc/org.texi

@@ -7562,11 +7562,11 @@ Dispatcher for all command related to attachments.
 @c
 @kindex C-c C-s
 @item C-c C-s
-Schedule this item
+Schedule this item, with prefix arg remove the scheduling timestamp
 @c
 @kindex C-c C-d
 @item C-c C-d
-Set a deadline for this item.
+Set a deadline for this item, with prefix arg remove the deadline.
 @c
 @kindex k
 @item k
@@ -7640,7 +7640,9 @@ Unmark all marked entries for bulk action.
 @kindex B
 @item B
 Bulk action: act on all marked entries in the agenda.  This will prompt for
-another key to select the action to be applied:
+another key to select the action to be applied.  The prefix arg to @kbd{B}
+will be passed through to the @kbd{s} and @kbd{d} commands, to bulk-remove
+these special timestamps.
 @example
 r  @r{Prompt for a single refile target and move all entries.  The entries}
    @r{will no longer be in the agenda, refresh (@kbd{g}) to bring them back.}

+ 7 - 0
lisp/ChangeLog

@@ -1,3 +1,10 @@
+2010-01-14  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-agenda.el (org-agenda-schedule, org-agenda-deadline):
+	Document that ARG is passed through to remove the date.
+	(org-agenda-bulk-action): Accept prefix arg and pass it on.  Do
+	not read a date when the user has given a `C-u' prefix.
+
 2010-01-11  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-agenda.el (org-agenda-fix-displayed-tags): Fix bug when all

+ 14 - 10
lisp/org-agenda.el

@@ -6644,7 +6644,8 @@ be used to request time specification in the time stamp."
     (message "Time stamp changed to %s" org-last-changed-timestamp)))
 
 (defun org-agenda-schedule (arg)
-  "Schedule the item at point."
+  "Schedule the item at point.
+Arg is passed through to `org-schedule'."
   (interactive "P")
   (org-agenda-check-type t 'agenda 'timeline 'todo 'tags 'search)
   (org-agenda-check-no-diary)
@@ -6665,7 +6666,8 @@ be used to request time specification in the time stamp."
     (message "Item scheduled for %s" ts)))
 
 (defun org-agenda-deadline (arg)
-  "Schedule the item at point."
+  "Schedule the item at point.
+Arg is passed through to `org-deadline'."
   (interactive "P")
   (org-agenda-check-type t 'agenda 'timeline 'todo 'tags 'search)
   (org-agenda-check-no-diary)
@@ -7168,9 +7170,10 @@ This will remove the markers, and the overlays."
   (setq org-agenda-bulk-marked-entries nil)
   (org-agenda-bulk-remove-overlays (point-min) (point-max)))
 
-(defun org-agenda-bulk-action ()
-  "Execute an remote-editing action on all marked entries."
-  (interactive)
+(defun org-agenda-bulk-action (&optional arg)
+  "Execute an remote-editing action on all marked entries.
+The prefix arg is passed through to the command if possible."
+  (interactive "P")
   (unless org-agenda-bulk-marked-entries
     (error "No entries are marked"))
   (message "Bulk: [r]efile [$]archive [A]rch->sib [t]odo [+/-]tag [s]chedule [d]eadline")
@@ -7216,17 +7219,18 @@ This will remove the markers, and the overlays."
       (setq cmd `(org-agenda-set-tags ,tag ,(if (eq action ?+) ''on ''off))))
 
      ((memq action '(?s ?d))
-      (let* ((date (org-read-date
-		    nil nil nil
-		    (if (eq action ?s) "(Re)Schedule to" "Set Deadline to")))
-	     (ans org-read-date-final-answer)
+      (let* ((date (unless arg
+		     (org-read-date
+		      nil nil nil
+		      (if (eq action ?s) "(Re)Schedule to" "Set Deadline to"))))
+	     (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))
 			  (old (and bound (symbol-function 'read-string))))
 		     (unwind-protect
 			 (progn
 			   (fset 'read-string (lambda (&rest ignore) ,ans))
-			   (call-interactively ',c1))
+			   (eval '(,c1 arg)))
 		       (if bound
 			   (fset 'read-string old)
 			 (fmakunbound 'read-string)))))))