From cab009b78e63bb8a3fd8d6dd25293f2d82b67068 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Thu, 14 Jan 2010 17:09:11 +0100 Subject: [PATCH] Improve documentation about prefix args to scheduling/deadline cmds in agenda --- doc/ChangeLog | 5 +++++ doc/org.texi | 8 +++++--- lisp/ChangeLog | 7 +++++++ lisp/org-agenda.el | 24 ++++++++++++++---------- 4 files changed, 31 insertions(+), 13 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index f062f068..175ac806 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2010-01-14 Carsten Dominik + + * org.texi (Agenda commands): Add information about prefix args to + scheduling and deadline commands. + 2010-01-05 Carsten Dominik * org.texi (Search view): Point to the docstring of diff --git a/doc/org.texi b/doc/org.texi index 4072cf50..a610caf2 100644 --- a/doc/org.texi +++ b/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.} diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4ae11f2e..c38b5827 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2010-01-14 Carsten Dominik + + * 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 * org-agenda.el (org-agenda-fix-displayed-tags): Fix bug when all diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index eaba9ad3..bb2efbac 100644 --- a/lisp/org-agenda.el +++ b/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))))))) -- 2.11.4.GIT